As shown in the example program above, the functions pfCAVEConfig, pfCAVEInitChannels, pfCAVEPreFrame, and pfCAVEPostFrame, take care of the basic CAVELib application control, and must be called in any pfCAVE program.
The pfCAVELib contains functions to set up transformations based on tracker or navigation data. pfCAVE provides DCS functions to add equivalent transformations to a Performer scene graph. pfCAVEDCSHeadTransform, pfCAVEDCSWandTransform, pfCAVEDCSSensorTransform, pfCAVEDCSNetHeadTransform, pfCAVEDCSNetWandTransform, and pfCAVEDCSNavTransform will each update a DCS with the latest transformation that would be generated by the similarly named CAVELib function. The DCS will need to be updated once per frame using these functions.
The pfCAVELib defines its own channel draw function (via pfChanTravFunc) in order to handle the stereo buffering and the additional rendering for the simulator and other irregular displays. This function calls pfDraw to render the Performer scene graph. If an application needs to call its own rendering functions as well, it can do so by registering draw callbacks with pfCAVEPreDrawFunc, pfCAVEDrawFunc, or pfCAVEPostDrawFunc.