
i
i
i
i
i
i
i
i
532 18. Building on the Basics, Some Projects in VR
// something has changed - may be set in many places
static bChange=FALSE;
// key function - called in response to Windows timer
static void RefreshScene(void){
// indicates if we are already busy !!!!!!
static BOOL bBusy=FALSE;
// indicates if collision detected between L & R tools
static BOOL bToolsHit=FALSE;
// acquire the latest data from the joysticks
UpdateInputState(glWndFrame);
// Move the virtual sculpting tools to mimic the
UpdateRightObject();
// actions of the joysticks.
UpdateLeftObject();
// can’t do anything if we not finished last call
if(bBusy)return;
// flag that we are busy
bBusy=TRUE; ...