CAVElib - Navigation
Tracking reports positions relative to the physical CAVE - the user is
restricted to moving inside this small space. Many
virtual environments occupy a much larger area. Navigation allows the
user to explore this larger space.
The concept behind navigation is that the VR display itself, with the user
inside, is moved through the virtual world. This is implemented by
a navigation transformation which is applied to everything that is rendered
in the environment.
The library maintains a transformation matrix which the application
can manipulate like the GL modeling transformation.
Navigation functions
- CAVENavLoadIdentity (void)
- CAVENavTranslate (float x, float y, float z)
- CAVENavRot (float angle, char axis)
- CAVENavScale (float xscale, float yscale, float zscale)
- 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)
- 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.
- 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.
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);
Example: navigate.cpp
next