DEVNOTES
author Radek Brich <radek.brich@devl.cz>
Sun, 31 May 2009 16:53:05 +0200
branchpyrit
changeset 99 f3abdaa2e8fb
parent 98 64638385798a
permissions -rw-r--r--
build script: updated for latest SCons, moved config.h to build/, help and clean targets does not run configure any more, fixed GCC check, added check for zlib
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     1
Container Usage
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     2
---------------
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     3
(Container|Octree|KdTree) top;
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     4
scene.setTop(top)  // top object in hierarchy
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     5
top.optimize()     // build optimization structure
45
76b254ce92cf note for new camera classes
Radek Brich <radek.brich@devl.cz>
parents: 44
diff changeset
     6
76b254ce92cf note for new camera classes
Radek Brich <radek.brich@devl.cz>
parents: 44
diff changeset
     7
Rework camera
76b254ce92cf note for new camera classes
Radek Brich <radek.brich@devl.cz>
parents: 44
diff changeset
     8
-------------
46
6493fb65f0b1 Doxygen
Radek Brich <radek.brich@devl.cz>
parents: 45
diff changeset
     9
Sampler - generate points in screen plane
45
76b254ce92cf note for new camera classes
Radek Brich <radek.brich@devl.cz>
parents: 44
diff changeset
    10
Camera - transform point from sampler to a ray
94
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    11
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    12
New Classes?
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    13
------------
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    14
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    15
scene.h   -- Scene, ...
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    16
reader.h  -- Reader, WavefrontReader
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    17
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    18
wf = new WavefrontReader()
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    19
wf.setContainer(top)
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    20
wf.setTransform(monkey_pos_matrix)
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    21
wf.read("monkey.obj")
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    22
// more transform&reads
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    23
destroy wf
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    24
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    25
Scene scene -- container with shapes, a camera and lights
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    26
scene = new Scene()
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    27
scene.setCamera(new Camera(eye, u, v, p))
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    28
scene.addLight(new PointLight(pos, color))
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    29
rt.setScene(scene)
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    30
rt.render(w,h)