TODO
author Radek Brich <radek.brich@devl.cz>
Sun, 18 Nov 2007 11:20:56 +0100
branchpyrit
changeset 6 d8d596d26f25
parent 4 c73bc405ee7a
child 7 bf17f9f84c91
permissions -rw-r--r--
pthreads and other fixes for Windows
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
ce23c7deb2d3 added TODO
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     1
 * kd-tree
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     2
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
container.h  -- Container
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     5
kdtree.h  -- KdTree
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     6
shapes.h  -- Triangle, Sphere
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     7
scene.h   -- Ray, Light, Camera, Scene
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     8
material.h -- Material, Texture
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
     9
matrix.h  -- Matrix
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    10
vector.h  -- Vector3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    11
reader.h  -- Reader, WavefrontReader
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    12
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    13
KdTree monkey
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    14
wf = new WavefrontReader()
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    15
wf.setContainer(monkey)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    16
wf.read("monkey.obj")
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    17
destroy wf
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    18
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    19
monkey.optimize()  -- i.e. build tree
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    20
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    21
Scene scene -- container with shapes, a camera and lights
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    22
scene = new Scene()
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    23
scene.setTop(monkey) -- top object in hierarchy
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    24
scene.setCamera(new Camera(pos, dir, angle))
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    25
scene.addLight(new PointLight(pos, color))
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    26
rt.setScene(scene)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    27
rt.render(w,h)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    28
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
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
    31
more parameters -- the data (ray origin and direction)