Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

P_CaveButtons.C

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 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_CaveButtons.C,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.20 $       $Date: 2019/01/17 21:21:00 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  * This is Paul's new Tracker code -- pgrayson@ks.uiuc.edu
00019  *
00020  *
00021  ***************************************************************************/
00022 
00023 #include <cave.macros.h>
00024 #include "CaveRoutines.h"
00025 #include "ResizeArray.h"
00026 #include "P_Buttons.h"
00027 #include "P_CaveButtons.h"
00028 
00029 CaveButtons::CaveButtons() {
00030   numButtons = 0; // no buttons until we know the CAVE is running
00031 }
00032 
00033 int CaveButtons::do_start(const SensorConfig *) {
00034   if (!vmd_cave_is_initialized() || CAVEController == NULL) {
00035     return 0;     // return false; cannot run without CAVE environment
00036   }
00037   numButtons = CAVEController->num_buttons;
00038   return 1;
00039 }
00040 
00041 void CaveButtons::update() {
00042   for(int i = 0; i < numButtons; i++) {
00043     stat[i] = (CAVEController->button[i]);
00044   }
00045 }
00046 

Generated on Wed Oct 9 02:43:18 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002