Navigation Functions

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.

CAVESetOption(CAVE_PROJ_INCLUDENAVIGATION, flag)
If flag is true, tells the CAVE library to automatically include the navigation transformation in the projection/modelview matrix that it sets up before calling the application's display function. When this option is set, CAVENavTransform() should not be called.

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.

CAVENavLock (void)
CAVENavUnlock (void)
Controls access to the navigation matrix, so that several transformations can be performed atomically.


The tracking functions CAVEGetPosition(), CAVEGetOrientation(), and CAVEGetVector() can also return values in navigated, rather than tracker, coordinates. To do this, append _NAV to the name of the value being requested. For example:

	CAVEGetPosition(CAVE_HEAD_NAV, headpos);


navigate1.c - Example navigation program

navigate2.c - Navigation example with interaction


Previous page    Next page

Last modified 19 July 1997.

Dave Pape, pape@evl.uic.edu