3D Engine Documentation
Installation and Usage
Proprietary File Formats
There's not much as far as installation, but here are simple instructions on
how to decompress and build the software, assuming you have a tarball.
Here is how to run the default cave application, including its various runtime
Cave(.cave) File Format
OBJ Extended 3D File Format
Scene(.sce) File Format
Class & Structure Requirements
Classes are circled. Structures are squared. Arrows denote which class/struct each class/struct requires.
Cave Object Class
Class cave_object stores cave attributes and provides methods to read
cave files, and to
update, draw, and test a cave.
Class image stores an image and provides methods for reading, writing, and
Class light stores light attributes including position/direction and
colors and provides a method to enable a light.
Class model reads and writes
OBJ-like files, and
provides methods used to display models.
Class scene encapsulates a lot of 3Dengine data, and provides a method for
reading scene files.
A method for writing scene files will be added at some point.
Singly-linked List Class
Template class sllist provides dynamic storage for any type of elements.
Class terrain provides methods to read a grayscale image and display it
as a terrain by interpreting it as a heightmap.
Class texture provides a method for reading an image and
storing it in a new 2D texture object.
Length 3 Vector Class
Template class vect<> provides logical, arithmetic, and assignment operations,
as well as other vector math functions for manipulating vectors consisting of
three floating point elements.
Structure camera stores location and orientation of a viewer, as well
as field-of-view and clipping attributes which define a viewing frustum.
Fog State Structure
Structure fog_state stores parameters of distance, density, function,
and color of fog.
Structure window stores position and size of a window/viewport, the
window's ID number, and a bit mask specifying it's display mode.
Color Type & Definitions
Define type Color and standard color constants.
This is an effort to abstract GLUT calls out of the main application
OpenGL Error Checking
If OpenGL has thrown an error, errorcheck prints the error code and optional
message, then exits the program.
These functions provide fast access to approximations of the desired