author | Radek Brich <radek.brich@devl.cz> |
Sun, 09 Dec 2007 15:01:51 +0100 | |
branch | pyrit |
changeset 33 | 83d0200d4c09 |
parent 32 | 8af5c17d368b |
child 34 | 28f6e8b9d5d1 |
permissions | -rw-r--r-- |
31 | 1 |
Bugs |
2 |
==== |
|
3 |
* concurrent read? (concurrent write should not occur) |
|
4 |
||
5 |
Future Plans |
|
6 |
============ |
|
11
4d192e13ee84
move nearest_intersection() to Container, add dummy KdTree.load(), plus small fixes
Radek Brich <radek.brich@devl.cz>
parents:
7
diff
changeset
|
7 |
* 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
|
8 |
- 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
|
9 |
- 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
|
10 |
- save/load |
31 | 11 |
* uniform grid, octree |
12 |
* textures (3D procedural, pixmaps later) |
|
28
ffe83ca074f3
smooth triangles (aka Phong shading)
Radek Brich <radek.brich@devl.cz>
parents:
21
diff
changeset
|
13 |
* update Python binding: Camera, new classes |
21
79b516a3803d
naive color driven sub-sampling
Radek Brich <radek.brich@devl.cz>
parents:
20
diff
changeset
|
14 |
* namespace |
32
8af5c17d368b
new Raytracer option: oversampling
Radek Brich <radek.brich@devl.cz>
parents:
31
diff
changeset
|
15 |
* stochastic oversampling |
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
|
16 |
|
7
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
6
diff
changeset
|
17 |
New Classes? |
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
6
diff
changeset
|
18 |
============ |
3 | 19 |
|
20 |
container.h -- Container |
|
21 |
kdtree.h -- KdTree |
|
22 |
shapes.h -- Triangle, Sphere |
|
23 |
scene.h -- Ray, Light, Camera, Scene |
|
24 |
material.h -- Material, Texture |
|
25 |
matrix.h -- Matrix |
|
26 |
vector.h -- Vector3 |
|
27 |
reader.h -- Reader, WavefrontReader |
|
28 |
||
7
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
6
diff
changeset
|
29 |
KdTree top |
3 | 30 |
wf = new WavefrontReader() |
7
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
6
diff
changeset
|
31 |
wf.setContainer(top) |
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
6
diff
changeset
|
32 |
wf.setTransform(monkey_pos_matrix) |
3 | 33 |
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
|
34 |
// more transform&reads |
3 | 35 |
destroy wf |
36 |
||
7
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
6
diff
changeset
|
37 |
top.optimize() -- i.e. build tree |
3 | 38 |
|
39 |
Scene scene -- container with shapes, a camera and lights |
|
40 |
scene = new Scene() |
|
7
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
6
diff
changeset
|
41 |
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
|
42 |
scene.setCamera(new Camera(eye, u, v, p)) |
3 | 43 |
scene.addLight(new PointLight(pos, color)) |
44 |
rt.setScene(scene) |
|
45 |
rt.render(w,h) |
|
46 |
||
47 |
||
48 |
constructors have zero or one parameter by default -- the object to copy data from |
|
49 |
more parameters -- the data (ray origin and direction) |