C++ Raytracer

May 22nd, 2008

I've finished a work on my Computer Programming assignment for studies few months ago but haven't had time to publish it... so without further introduction all related files are here.

Files include documentation, tarball with a some old version, repository (blaRAY.git.tar.bz2 compiles), 3 poor renders, scene description examples. There is also a file in Polish language (Sprawozdanie.pdf) describing the thing for my CP professor.

Project is also available here: http://repo.or.cz/w/blaRAY.git

Probably interesting things to notice...

  • This project is thoroughly documented using Doxygen and I admit that using this tool was a real fun. Documentation was handy for me even during the development itself. Example entry
  • All types used in program are created using modified explicit_t<> template of Michał 'Sektor' Malecki which nicely kills all implicit conversions (see General/Types.h and Testcases)
  • Scene to be rendered is described with XML file parsed with libxml.
  • It's object-oriented. Well, it had to be. But I was trying hard to create a good object-oriented code which as I believe is not so easy...
  • It's not so small: 2945 lines in .cc files + 2471 in .hh files = 5416.
  • It was intended as photon mapper but I hadn't got enough time for it. It could be done with not much effort by adding some code into Render/Photon.cc
  • No optimizations in collision detection code. Only spheres + planes + simple textures. Code written in a manner which should make it easy for extending it's features. Theoretically.

I hope you enjoy it. :)

Comment by Saleh

submitted on November 18th, 2011 at 18:21

FYI, if compiling on OSX, do not forget to first compile and install SDL lib and then modify the linker flags in makefile :
LDFLAGS=-lSDLmain -lSDL -framework Cocoa `pkg-config --libs libxml-2.0`

Add a comment [+] Hide the comment form [-]

I'm a bot, please ignore this comment.

I'm not a bot. Tick this box.

This is a mail of my good friend who loves rubbish email. Send him some if you want to land on my not-so-welcome lists: John Sparrow john@thera.be john(at)thera.be