00001 /*************************************************************************** 00002 *cr 00003 *cr (C) Copyright 1995-2011 The Board of Trustees of the 00004 *cr University of Illinois 00005 *cr All Rights Reserved 00006 *cr 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * RCS INFORMATION: 00011 * 00012 * $RCSfile: P_FreeVRButtons.C,v $ 00013 * $Author: johns $ $Locker: $ $State: Exp $ 00014 * $Revision: 1.15 $ $Date: 2011/06/08 21:18:10 $ 00015 * 00016 *************************************************************************** 00017 * DESCRIPTION: 00018 * This is Paul's new Tracker code -- pgrayson@ks.uiuc.edu 00019 ***************************************************************************/ 00020 00021 #include <freevr.h> 00022 #include "P_FreeVRButtons.h" 00023 00024 int FreeVRButtons::do_start(const SensorConfig *) { 00025 // XXX Somehow check that a FreeVR environment exists. If it doesn't, 00026 // return false. 00027 if ( 0 ) { 00028 return 0; // no FreeVR, cannot run FreeVR buttons. 00029 } 00030 return 1; // FreeVR is active. 00031 } 00032 00033 void FreeVRButtons::update() { 00034 // the mapping of buttons is different in FreeVR than CAVElib 00035 stat[0]=vrGet2switchValue(1); 00036 stat[1]=vrGet2switchValue(2); 00037 stat[2]=vrGet2switchValue(3); 00038 stat[3]=vrGet2switchValue(0); 00039 } 00040
1.2.14 written by Dimitri van Heesch,
© 1997-2002