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

Classes
-------

vector.h -- vector of three scalars, also used for colour
matrix.h -- matrix class, currently not used
quaternion.h -- quaternion class for camera rotation

container.h  -- container for shapes, base class for octree and kd-tree
octree.h -- Octree space subdivision structure for acceleration of ray-shape intersection search
kdtree.h  -- KdTree space subdivision structure

scene.h -- scene objects: Ray, Light, Camera and shapes
raytracer.h -- ray tracer class
common.h -- Float definition (float/double) and some helper functions


Container Usage
---------------
(Container|Octree|KdTree) top;
scene.setTop(top)  // top object in hierarchy
top.optimize()     // build optimization structure

Rework camera
-------------
Sampler - generate points in screen plane
Camera - transform point from sampler to a ray

New Classes?
------------

scene.h   -- Scene, ...
reader.h  -- Reader, WavefrontReader

wf = new WavefrontReader()
wf.setContainer(top)
wf.setTransform(monkey_pos_matrix)
wf.read("monkey.obj")
// more transform&reads
destroy wf

Scene scene -- container with shapes, a camera and lights
scene = new Scene()
scene.setCamera(new Camera(eye, u, v, p))
scene.addLight(new PointLight(pos, color))
rt.setScene(scene)
rt.render(w,h)