Sep 6

This is my last post about how I developed a compile-time raytracer based on Boost::MPL and on custom classes (source code available at the bottom of the post).

Read the rest of this entry »

Sep 6

Now that I have classes to handle floating-point values, I need to add support for 3D vectors and find a way to implement the raytracing engine…which is far from easy!

Read the rest of this entry »

Sep 5

Yes, I was crazy enough to try to develop a compile-time raytracer only by using C++ meta programming. I used extensively the Boost::MPL library, but I had to develop a lot of new classes to be able to handle floating-point types, and to be able to perform standard algorithms on them, like sqrt, but also to manage 3D vectors, sphere-ray intersections, 2D images, etc.

My idea in this post and the following is to describe what I had to face during the project and how I overcome the problems, not to describe each class in detail, which would not be very interesting and understandable. Indeed, as I realized doing this project, finished meta-programming code tend to be very complex to read.

Read the rest of this entry »

« Previous Entries