Credits: includes notes, examples, and diagrams adapted from Dave Pape, Andy Johnson, Michael Capps, and NCSA Vis group
Unsynchronized: bounce.cc Data Access Synchronized through Shared Memory Locks: bounce_lock.cc Higher-level Synchronization through Process Barriers: bounce_barrier.cc
CAVENavLoadIdentity (void)
CAVENavTranslate (float x, float y, float z)
CAVENavRot (float angle, char axis)
CAVENavScale (float xscale, float yscale, float zscale)
CAVENavMultMatrix (float mat[4][4])
CAVENavLoadMatrix (float mat[4][4])
CAVENavGetMatrix (float mat[4][4])
Operate on the current navigation matrix. These functions are similar to the corresponding GL functions.
The transformations are in physical CAVE coordinates (they are post-multiplied).
CAVENavWorldTranslate (float x, float y, float z)
CAVENavWorldRot (float angle, char axis)
CAVENavWorldScale (float xscale, float yscale, float zscale)
CAVENavPreMultMatrix (float mat[4][4])
Operate on the navigation matrix, but are pre-multiplied. These transformations thus are in world coordinates, rather than local
CAVE coordinates.
CAVENavTransform (void)
Applies the latest navigation transformation. This should only be called in the display processes.
CAVENavLock (void)
CAVENavUnlock (void)
Controls access to the navigation matrix, so that several transformations can be performed atomically.
CAVENavConvertCAVEToWorld (float inposition[3], float outposition[3])
CAVENavConvertVectorCAVEToWorld (float invector[3], float outvector[3])
Converts a position or direction vector from physical CAVE coordinates to navigated world coordinates.CAVENavConvertWorldToCAVE (float inposition[3], float outposition[3])
CAVENavConvertVectorWorldToCAVE (float invector[3], float outvector[3])
Converts a position or direction vector from navigated coordinates to physical coordinates.
float CAVEGetTime(void)
Returns the current "CAVE time", i.e. the number
of seconds since the CAVE was initialized. The difference between this
and
*CAVETime is that CAVEGetTime computes the time
when it is called, whereas *CAVETime is only updated once per frame.
float *CAVEFramesPerSecond
The current frame rate. This is pointer to a float
because it is stored in shared memory, and so is the same for all processes.
Animations which are absolute (i.e. a simple function of the current
time) use the current time directly.
t = CAVEGetTime();
height = abs(sin(t));
Animations (including most common navigation methods) which are cumulative
or relative (i.e. make small incremental changes to the overall value),
compute and use the change in time.
static float prev_t;
curr_t = CAVEGetTime();
delta_t = curr_t - prev_t;
height = height + func(delta_t);
...
prev_t = curr_t;
It is also possible (albeit, less intuitive to use the current frame rate to drive animations)
/usr/local/CAVE/etc/cave.config
/usr/local/CAVE/etc/<machine_name>.config
<your home directory>/.caverc
<current working directory>/.caverc
Significant options are:
The configuration files for mammoth: cave.config, mammoth.config
Configuration file tricks (from Dave
Pape)