00001 //=========================================================================== 00002 /* 00003 This file is part of the CHAI 3D visualization and haptics libraries. 00004 Copyright (C) 2003-2009 by CHAI 3D. All rights reserved. 00005 00006 This library is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License("GPL") version 2 00008 as published by the Free Software Foundation. 00009 00010 For using the CHAI 3D libraries with software that can not be combined 00011 with the GNU GPL, and for taking advantage of the additional benefits 00012 of our support services, please contact CHAI 3D about acquiring a 00013 Professional Edition License. 00014 00015 \author <http://www.chai3d.org> 00016 \author Francois Conti 00017 \version 2.0.0 $Rev: 250 $ 00018 */ 00019 //=========================================================================== 00020 00021 //--------------------------------------------------------------------------- 00022 #ifndef CFalconDeviceH 00023 #define CFalconDeviceH 00024 //--------------------------------------------------------------------------- 00025 #if defined(_ENABLE_FALCON_DEVICE_SUPPORT) 00026 //--------------------------------------------------------------------------- 00027 #include "devices/CGenericHapticDevice.h" 00028 //--------------------------------------------------------------------------- 00029 00030 //=========================================================================== 00038 //=========================================================================== 00039 00040 //=========================================================================== 00049 //=========================================================================== 00050 class cFalconDevice : public cGenericHapticDevice 00051 { 00052 public: 00053 00054 //----------------------------------------------------------------------- 00055 // CONSTRUCTOR & DESTRUCTOR: 00056 //----------------------------------------------------------------------- 00057 00059 cFalconDevice(unsigned int a_deviceNumber = 0); 00060 00062 virtual ~cFalconDevice(); 00063 00064 //----------------------------------------------------------------------- 00065 // METHODS: 00066 //----------------------------------------------------------------------- 00067 00069 int open(); 00070 00072 int close(); 00073 00075 int initialize(const bool a_resetEncoders=false); 00076 00078 unsigned int getNumDevices(); 00079 00081 int getPosition(cVector3d& a_position); 00082 00084 int setForce(cVector3d& a_force); 00085 00087 int getUserSwitch(int a_switchIndex, bool& a_status); 00088 00089 00090 private: 00091 00093 static int m_dllcount; 00094 00096 int m_deviceID; 00097 00099 bool m_driverInstalled; 00100 }; 00101 00102 //--------------------------------------------------------------------------- 00103 #endif 00104 //--------------------------------------------------------------------------- 00105 #endif //_ENABLE_FALCON_DEVICE_SUPPORT 00106 //---------------------------------------------------------------------------