TODO
author Radek Brich <radek.brich@devl.cz>
Wed, 05 Dec 2007 18:54:23 +0100
branchpyrit
changeset 24 d0d76e8a5203
parent 21 79b516a3803d
child 28 ffe83ca074f3
permissions -rw-r--r--
new C++ demo: realtime_dragon.cc class Container moved to its own source file (from kdtree.*) new directory for models and Makefile which downloads and prepares them fixed python module path in some forgotten demos ShapeList moved to scene.h

 * kd-tree:
   - optimize structures
   - optimize construction: do not use bounding boxes of shapes, instead implement box-shape intersection
   - save/load
 * update Python binding, Camera, new classes
 * more complex demos
 * check/update triangle routines
 * namespace

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(eye, u, v, p))
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)