TODO
author Radek Brich <radek.brich@devl.cz>
Sat, 17 Nov 2007 17:20:36 +0100
branchpyrit
changeset 4 c73bc405ee7a
parent 3 8f9cb0526c47
child 6 d8d596d26f25
permissions -rw-r--r--
multi-threaded rendering via pthreads added README

 * pthreads for Windows: http://sources.redhat.com/pthreads-win32/
 * kd-tree


container.h  -- Container
kdtree.h  -- KdTree
shapes.h  -- Triangle, Sphere
scene.h   -- Ray, Light, Camera, Scene
material.h -- Material, Texture
matrix.h  -- Matrix
vector.h  -- Vector3
reader.h  -- Reader, WavefrontReader

KdTree monkey
wf = new WavefrontReader()
wf.setContainer(monkey)
wf.read("monkey.obj")
destroy wf

monkey.optimize()  -- i.e. build tree

Scene scene -- container with shapes, a camera and lights
scene = new Scene()
scene.setTop(monkey) -- top object in hierarchy
scene.setCamera(new Camera(pos, dir, angle))
scene.addLight(new PointLight(pos, color))
rt.setScene(scene)
rt.render(w,h)


constructors have zero or one parameter by default -- the object to copy data from
more parameters -- the data (ray origin and direction)