I know, but when I started writing this thing I had no knowledge of how to do it, so I tried to implement as much as possible from a book I bought (Physically based rendering), and there they uses Point for a few things. I later found out that this made things much harder, so I decided to make a easy way of fixing it instead of rewriting so much.
Nice work! I see you started with global illumination, was it hard to implement? So far I only have diffuse lighting as you probably saw
Right now I'm thinking of removing all the primitive classes and only have a mesh class. Its so much more fun to have some real objects instead of just spheres. But I plan to keep the sphere (and add at least box) code and use it for bounding box calculations to speed it all up.
What do you think of doing mesh collision like this:
Code:
intersectionTest(Ray r)
{
if (boundingBoxTest == 1)
Check each of the triangles
Return the closest one
}
I think that will save a lot of calculation time.
Btw: Are you still working on your raytracer?