DEVNOTES
author Radek Brich <radek.brich@devl.cz>
Wed, 19 Aug 2009 09:18:29 +0200
branchpyrit
changeset 101 50a994a57849
parent 98 64638385798a
permissions -rw-r--r--
vcproj build target only for cc=msvc, fix sdl-config

Container Usage
---------------
(Container|Octree|KdTree) top;
scene.setTop(top)  // top object in hierarchy
top.optimize()     // build optimization structure

Rework camera
-------------
Sampler - generate points in screen plane
Camera - transform point from sampler to a ray

New Classes?
------------

scene.h   -- Scene, ...
reader.h  -- Reader, WavefrontReader

wf = new WavefrontReader()
wf.setContainer(top)
wf.setTransform(monkey_pos_matrix)
wf.read("monkey.obj")
// more transform&reads
destroy wf

Scene scene -- container with shapes, a camera and lights
scene = new Scene()
scene.setCamera(new Camera(eye, u, v, p))
scene.addLight(new PointLight(pos, color))
rt.setScene(scene)
rt.render(w,h)