Cave Object Class Summary Class cave_object stores cave attributes and provides methods to read, update, draw, and test a cave(virtual representatio of a spatially immersive display). State bool mode cave mode flag, signifies whether cave rendering (transforms and drawing) is currently enabled Default: false model *mdl pointer to cave geometry uint *facetptr pointer to indeces to the vertices of the current facet uint facet index to the current facet uint nfacets number of facets contained in 'mdl' uint nsides number of sides of current facet uint plus_side indexes current side of current facet relative to the long side float Xscale scales the output image horizontally Default: 1 float Yscale scales the output image vertically Default: 1 float Xskew angle, in degrees, of horizontal skew Default: 0 float Yskew angle, in degrees, of vertical skew Default: 0 Methods cave_object() Set default values as listed above. Pointers are set to NULL. Unless specified above, numbers are set to zero. void dump(char* append="") Dump cave information, most of which can be used in a cave(.cave) file, then print the given append string. int read(char *pathname) Read a cave(.cave) file and sets any attributes which it specifies. Return zero upon success, less-than-zero upon failure. void update(window *win, camera *cam) Update the projection matrix and variables which are used for cave transformations. Set the camera structure's nearclip based on the distance from the viewer position to the current facet, and use the new nearclip and the given farclip to set up the viewing frustum. The window structure is needed to get the window/screen aspect ratio. void translation() Translate based on the viewer position relative to the cave. This should be applied to all objects in the scene whose location can change. void rotation() Rotate such that the line-of-sight is orthogonal to the current facet. This should be applied to all objects in the scene whose orientation can change. void draw() Draw the cave border. This should be the last drawing function called, and should be called without depth testing. void testing() Draw visual aids: wireframe cave, filled current facet, facet normal, cone representing the viewer, etc. Note: This should only be called when cave mode is off(false).