author | Radek Brich <radek.brich@devl.cz> |
Thu, 15 May 2008 19:15:57 +0200 | |
branch | pyrit |
changeset 97 | 2a853d284a6a |
parent 94 | 4c8abb8977dc |
child 98 | 64638385798a |
permissions | -rw-r--r-- |
44 | 1 |
Classes |
2 |
------- |
|
7
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
3 |
|
44 | 4 |
vector.h -- vector of three scalars, also used for colour |
5 |
matrix.h -- matrix class, currently not used |
|
6 |
quaternion.h -- quaternion class for camera rotation |
|
7
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
7 |
|
44 | 8 |
container.h -- container for shapes, base class for octree and kd-tree |
9 |
octree.h -- Octree space subdivision structure for acceleration of ray-shape intersection search |
|
10 |
kdtree.h -- KdTree space subdivision structure |
|
7
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
11 |
|
44 | 12 |
scene.h -- scene objects: Ray, Light, Camera and shapes |
13 |
raytracer.h -- ray tracer class |
|
14 |
common.h -- Float definition (float/double) and some helper functions |
|
7
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
15 |
|
bf17f9f84c91
kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
16 |
|
44 | 17 |
Container Usage |
18 |
--------------- |
|
19 |
(Container|Octree|KdTree) top; |
|
20 |
scene.setTop(top) // top object in hierarchy |
|
21 |
top.optimize() // build optimization structure |
|
45
76b254ce92cf
note for new camera classes
Radek Brich <radek.brich@devl.cz>
parents:
44
diff
changeset
|
22 |
|
76b254ce92cf
note for new camera classes
Radek Brich <radek.brich@devl.cz>
parents:
44
diff
changeset
|
23 |
Rework camera |
76b254ce92cf
note for new camera classes
Radek Brich <radek.brich@devl.cz>
parents:
44
diff
changeset
|
24 |
------------- |
46 | 25 |
Sampler - generate points in screen plane |
45
76b254ce92cf
note for new camera classes
Radek Brich <radek.brich@devl.cz>
parents:
44
diff
changeset
|
26 |
Camera - transform point from sampler to a ray |
94 | 27 |
|
28 |
New Classes? |
|
29 |
------------ |
|
30 |
||
31 |
scene.h -- Scene, ... |
|
32 |
reader.h -- Reader, WavefrontReader |
|
33 |
||
34 |
wf = new WavefrontReader() |
|
35 |
wf.setContainer(top) |
|
36 |
wf.setTransform(monkey_pos_matrix) |
|
37 |
wf.read("monkey.obj") |
|
38 |
// more transform&reads |
|
39 |
destroy wf |
|
40 |
||
41 |
Scene scene -- container with shapes, a camera and lights |
|
42 |
scene = new Scene() |
|
43 |
scene.setCamera(new Camera(eye, u, v, p)) |
|
44 |
scene.addLight(new PointLight(pos, color)) |
|
45 |
rt.setScene(scene) |
|
46 |
rt.render(w,h) |