points[n].position = ray_start+ray_direction*x;
points[n].normal = compose(base_points[i].normal, T(0));
points[n].distance = x;
+ points[n].entry = base_points[i].entry;
}
++n;
points[n].normal = LinAl::Vector<T, D>();
points[n].normal[D-1] = i;
points[n].distance = x;
+ points[n].entry = (T(i)*ray_direction[D-1]<T(0));
}
++n;
points[0].position = ray.get_start()+ray.get_direction()*x;
points[0].normal = normal;
points[0].distance = x;
+ points[0].entry = (c<T(0));
}
return 1;
points[n].normal = LinAl::Vector<T, D>();
points[n].normal[i] = j;
points[n].distance = x;
+ points[n].entry = (T(j)*ray.get_direction()[i]<T(0));
if(n==1 && x<points[0].distance)
std::swap(points[0], points[1]);
points[n].position = ray.get_start()+ray.get_direction()*x;
points[n].normal = normalize(points[n].position);
points[n].distance = x;
+ points[n].entry = (i<0);
}
++n;
{
unsigned count = shape->get_intersections(ray, points, size);
for(unsigned i=0; i<count; ++i)
+ {
points[i].normal = -points[i].normal;
+ points[i].entry = !points[i].entry;
+ }
return count;
}
LinAl::Vector<T, N> position;
LinAl::Vector<T, N> normal;
T distance;
+ bool entry;
};
template<typename T, unsigned N>