From: Martin R. <ma...@MP...> - 2004-11-03 12:53:02
|
Hi all, sorry, I completely forgot about this email... > >>There also seems to be some complicated interaction between the renderer >>and the sampling object in RAYTRACER::Get_Pixel(). It might be easier >>to have a method SAMPLING2d::Calc_Pixel(u,v,du,dv), which in turn calls >>Renderer->Trace_Camera_Ray() as often as it needs to, and returns the >>final colour. This is possible since the renderer is a public global >>variable, and it would make the interfaces and interactions much simpler. > > > This would work for the current use case. But the sampling class is intended > to be used in other sampling cases as well. It can be used to sample any > 2-dimension function, using the warp functions it can be used e.g. to sample > a hemisphere of incoming directions. > If you have a suggestion for an easier interface without having the > SAMPLING2D class to know abou the current user (the ray tracer in this > case) let me know. I see, and I don't have a better idea at the moment. So please commit your patch. Cheers, Martin |