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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
c73bc405ee7a multi-threaded rendering via pthreads
Radek Brich <radek.brich@devl.cz>
parents: 3
diff changeset
     1
 * pthreads for Windows: http://sources.redhat.com/pthreads-win32/
2
ce23c7deb2d3 added TODO
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     2
 * kd-tree
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     4
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     5
container.h  -- Container
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     6
kdtree.h  -- KdTree
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     7
shapes.h  -- Triangle, Sphere
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     8
scene.h   -- Ray, Light, Camera, Scene
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     9
material.h -- Material, Texture
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    10
matrix.h  -- Matrix
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    11
vector.h  -- Vector3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    12
reader.h  -- Reader, WavefrontReader
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    13
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    14
KdTree monkey
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    15
wf = new WavefrontReader()
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    16
wf.setContainer(monkey)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    17
wf.read("monkey.obj")
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    18
destroy wf
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    19
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    20
monkey.optimize()  -- i.e. build tree
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    21
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    22
Scene scene -- container with shapes, a camera and lights
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    23
scene = new Scene()
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    24
scene.setTop(monkey) -- top object in hierarchy
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    25
scene.setCamera(new Camera(pos, dir, angle))
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    26
scene.addLight(new PointLight(pos, color))
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    27
rt.setScene(scene)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    28
rt.render(w,h)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    29
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    30
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    31
constructors have zero or one parameter by default -- the object to copy data from
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    32
more parameters -- the data (ray origin and direction)