TODO
author Radek Brich <radek.brich@devl.cz>
Mon, 26 Nov 2007 17:31:37 +0100
branchpyrit
changeset 18 25b7c445cf61
parent 15 a0a3e334744f
child 19 4e0955fca797
permissions -rw-r--r--
new demo: dragon.py

 * kd-tree:
   - optimize structures
   - optimize construction: do not use bounding boxes of shapes, instead implement box-shape intersection
 * transforms, camera
 * update Python binding, new classes
 * more complex demos


New Classes?
============

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 top
wf = new WavefrontReader()
wf.setContainer(top)
wf.setTransform(monkey_pos_matrix)
wf.read("monkey.obj")
// more transform&reads
destroy wf

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

Scene scene -- container with shapes, a camera and lights
scene = new Scene()
scene.setTop(top) -- 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)