Getting input from the hardware devices is conceptually the same, but the implementations are quite different between the CAVElib™ software and VR Juggler.
To get tracking information, the following functions are used:
CAVEGetPosition(id, pos)
CAVEGetOrientation(id, orient)
CAVEGetVector(id, vec)
CAVEGetSensorPosition(sensor, coords, pos)
CAVEGetSensorOrientation(sensor, coords, orient)
CAVEGetSensorVector(sensor, id, vec)
For button input, the following macros are used:
CAVEBUTTON1, CAVEBUTTON2, CAVEBUTTON3, CAVEBUTTON4, CAVE_JOYSTICK_X, and CAVE_JOYSTICK_Y
CAVEButtonChange()
To get device input, use the classes derived from gadget::DeviceInterface. They include the following:
gadget::PositionInterface (for trackers and other positional devices)
gadget::DigitalInterface (for buttons and other on/off devices)
gadget::AnalogInterface (for potentiometers and other multi-range data devices)
For more information about the VR Juggler device interfaces, refer to Chapter 3, Helper Classes. A tutorial on getting device input in VR Juggler applications can be found in the section called “Getting Input”.