DEVNOTES
author Radek Brich <radek.brich@devl.cz>
Sat, 10 May 2008 14:29:37 +0200
branchpyrit
changeset 95 ca7d4c665531
parent 94 4c8abb8977dc
child 98 64638385798a
permissions -rw-r--r--
build script fixes, add ldflags build option update and enhance demos fix bug in 4x grid oversampling warn if writePNG called while compiled without libpng make shapes in ShapeList const and add many other const needed due to snowball effect slightly optimize Camera::makeRayPacket using _mm_shuffle_ps make Vector SIMD vectorization disabled by default (causes problems) fix bug in implicit reflection of transmissive surfaces, when surface's reflection parameter is set to zero
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     1
Classes
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     2
-------
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     3
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     4
vector.h -- vector of three scalars, also used for colour
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     5
matrix.h -- matrix class, currently not used
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     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
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     8
container.h  -- container for shapes, base class for octree and kd-tree
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     9
octree.h -- Octree space subdivision structure for acceleration of ray-shape intersection search
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    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
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    12
scene.h -- scene objects: Ray, Light, Camera and shapes
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    13
raytracer.h -- ray tracer class
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    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
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    17
Container Usage
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    18
---------------
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    19
(Container|Octree|KdTree) top;
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    20
scene.setTop(top)  // top object in hierarchy
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    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
6493fb65f0b1 Doxygen
Radek Brich <radek.brich@devl.cz>
parents: 45
diff changeset
    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
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    27
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    28
New Classes?
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    29
------------
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    30
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    31
scene.h   -- Scene, ...
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    32
reader.h  -- Reader, WavefrontReader
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    33
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    34
wf = new WavefrontReader()
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    35
wf.setContainer(top)
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    36
wf.setTransform(monkey_pos_matrix)
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    37
wf.read("monkey.obj")
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    38
// more transform&reads
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    39
destroy wf
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    40
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    41
Scene scene -- container with shapes, a camera and lights
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    42
scene = new Scene()
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    43
scene.setCamera(new Camera(eye, u, v, p))
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    44
scene.addLight(new PointLight(pos, color))
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    45
rt.setScene(scene)
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 64
diff changeset
    46
rt.render(w,h)