Graphics Reference
In-Depth Information
d far
d near
n
Figure 4.12 A slab is the infinite region of space between two planes, defined by a normal
n and two signed distances from the origin.
4.6.1 Kay-Kajiya Slab-based Volumes
First introduced by Kay and Kajiya for speeding up ray-object intersection tests,
Kay-Kajiya volumes are a family of many-sided parallelepipedal bounding volumes
based on the intersection of slabs [Kay86]. A slab is the infinite region of space
between two parallel planes (Figure 4.12). This plane set is represented by a unit
vector n (the plane-set normal) and two scalar values giving the signed distance from
the origin (along n ) for both planes.
// Region R =
(x, y, z) | dNear <= a*x + b*y + c*z <= dFar
struct Slab {
float n[3];
// Normal n = (a, b, c)
float dNear;
// Signed distance from origin for near plane (dNear)
float dFar;
// Signed distance from origin for far plane (dFar)
};
To form a bounding volume, a number of normals are chosen. Then, for each
normal, pairs of planes are positioned so that they bound the object on both its sides
along the direction of the normal. For polygonal objects, the positions of the planes
can be found by computing the dot product of the normal and each object vertex.
The minimum and maximum values are then the required scalar values defining the
plane positions.
To form a closed 3D volume, at least three slabs are required. Both AABBs and OBBs
are examples of volumes formed as the intersection of three slabs. By increasing the
Search WWH ::




Custom Search