{
load_shape();
+ vector<Geometry::SurfacePoint<double, 3> > points(shape->get_max_ray_intersections());
+
for(unsigned y=0; y<height; ++y)
{
double yf = 1.0-y*2.0/height;
{
double xf = x*2.0/width-1.0;
Geometry::Ray<double, 3> ray(LinAl::Vector<double, 3>(0, 0, 5), LinAl::Vector<double, 3>(xf, yf, -2));
- Geometry::SurfacePoint<double, 3> points[4];
- unsigned count = shape->get_intersections(ray, points, 4);
+ unsigned count = shape->get_intersections(ray, &points[0], points.size());
UInt8 *pixel = pixels+y*width+x;
if(count)
*pixel = 255*(0.2+max(dot(points[0].normal, LinAl::Vector<double, 3>(0, 0, 1)), 0.0)*0.8);