Source Code for the View-Frustum Culler

written and documented by Kenny Hoff
last updated 07-28-96 at 10:20 p.m.


makefile : another UNIX makefile

init.dat : View-frustum culler test driver's initialization file

testpath.dat : Sample animation file used for test driver.

common.hpp, common.cpp : The common object list (as a point-set) class.

bvtree.hpp, bvtree.cpp : Bounding-Volume (BV) class declaration and implementation.

obbtree.hpp, obbtree.cpp : OBBtree class declaration and implementation.

aabbtree.hpp, aabbtree.cpp : AABBtree class declaration and implementation.

sphrtree.hpp, sphrtree.cpp : SPHEREtree class declaration and implementation.

bvvfc.hpp, bvvfc.cpp : Bounding-Volume hierarchy View-Frustum culler.

main.cpp : sample test driver for the View-Frustum culler

viewfrus.hpp : Perspective viewing frustum class def (derived from Camera). Defines the viewing frustum convex polyhedron which to cull against. The polyhedron is composed of six planes: Near (N), Far (F), Left (L), Right (R), Top (T), Bottom (B) with respect to the viewer. This class will calculate and store the vertices and plane equations for the frustum.

camera.hpp : Camera class definition used to define a perspective viewing frustum to cull against. (1) Defines and stores a "camera" composed of 3 coord axes, an origin for these axes, a center-of-projection (in Cam coords), a near and far plane (in Cam coords), and the viewplane window extents (projection window defined in Cam coords on the Cam XY-plane). (2) Accomodates "off-axis" COPs and "off-center" viewplane window extents. (3) Gives users several options in "constructing" a camera and altering its parameters. During animation, it is recommended to set the params directly (they are public).

plane.hpp : Infinite plane class definition. Defines a plane in point-normal form (N dot P = D OR Ax+By+Cz=D where (A,B,C) is the normal to the plane). (1) Calcs plane eq coefficients given 3 pts on the plane. (2) Performs "inside-outside" test given a pt ("outside" is the half-space in the direction of the normal, "inside" is the opposite half-space and the plane itself; includes the boundary for "inside"). (3) Calculates the intersection of a ray with the plane given ray's start point and direction vector.

vect3d.hpp : A 3D vector class.

makevrml.hpp : VRML class definition. Handles the creation of VRML files by handling various primitive objects.

m33.hpp, m33.cpp : 3x3 matrix class declaration and implementation

cardsurf.tri : A sample triangle model file

output.wrl : A sample output VRML file.