TODO
author Radek Brich <radek.brich@devl.cz>
Fri, 07 Dec 2007 14:56:39 +0100
branchpyrit
changeset 25 b8232edee786
parent 21 79b516a3803d
child 28 ffe83ca074f3
permissions -rw-r--r--
tuned ray-triangle intersection, now there are three algorithms to choose from: Plucker, Barycentric and Barycentric with preprocessing (Wald) methods in Vector and Shape (and derivates) made const
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11
4d192e13ee84 move nearest_intersection() to Container, add dummy KdTree.load(), plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     1
 * kd-tree:
4d192e13ee84 move nearest_intersection() to Container, add dummy KdTree.load(), plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     2
   - optimize structures
4d192e13ee84 move nearest_intersection() to Container, add dummy KdTree.load(), plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     3
   - optimize construction: do not use bounding boxes of shapes, instead implement box-shape intersection
19
4e0955fca797 added Camera, currently w/o Python binding
Radek Brich <radek.brich@devl.cz>
parents: 15
diff changeset
     4
   - save/load
4e0955fca797 added Camera, currently w/o Python binding
Radek Brich <radek.brich@devl.cz>
parents: 15
diff changeset
     5
 * update Python binding, Camera, new classes
13
fbd1d2f7d94e new python demo: buddha
Radek Brich <radek.brich@devl.cz>
parents: 12
diff changeset
     6
 * more complex demos
20
f22952603f29 new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents: 19
diff changeset
     7
 * check/update triangle routines
21
79b516a3803d naive color driven sub-sampling
Radek Brich <radek.brich@devl.cz>
parents: 20
diff changeset
     8
 * namespace
14
fc18ac4833f2 replace Plane with axis-aligned Box (because infinite Plane is not usable with kd-tree)
Radek Brich <radek.brich@devl.cz>
parents: 13
diff changeset
     9
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    10
New Classes?
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    11
============
3
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
container.h  -- Container
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    14
kdtree.h  -- KdTree
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    15
shapes.h  -- Triangle, Sphere
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    16
scene.h   -- Ray, Light, Camera, Scene
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    17
material.h -- Material, Texture
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    18
matrix.h  -- Matrix
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    19
vector.h  -- Vector3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    20
reader.h  -- Reader, WavefrontReader
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    21
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    22
KdTree top
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    23
wf = new WavefrontReader()
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    24
wf.setContainer(top)
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    25
wf.setTransform(monkey_pos_matrix)
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    26
wf.read("monkey.obj")
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    27
// more transform&reads
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    28
destroy wf
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    29
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    30
top.optimize()  -- i.e. build tree
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    31
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    32
Scene scene -- container with shapes, a camera and lights
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    33
scene = new Scene()
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    34
scene.setTop(top) -- top object in hierarchy
20
f22952603f29 new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents: 19
diff changeset
    35
scene.setCamera(new Camera(eye, u, v, p))
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    36
scene.addLight(new PointLight(pos, color))
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    37
rt.setScene(scene)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    38
rt.render(w,h)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    39
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    40
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    41
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
    42
more parameters -- the data (ray origin and direction)