00001 // Filename: vrpnAnalogDevice.h 00002 // Created by: drose (26Jan01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef VRPNANALOGDEVICE_H 00020 #define VRPNANALOGDEVICE_H 00021 00022 #include <pandabase.h> 00023 00024 #include <clientAnalogDevice.h> 00025 00026 class VrpnClient; 00027 class VrpnAnalog; 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Class : VrpnAnalogDevice 00031 // Description : The Panda interface to a VRPN analog device. This 00032 // object will be returned by VrpnClient::make_device(), 00033 // for attaching to a AnalogNode. 00034 // 00035 // This class does not need to be exported from the DLL. 00036 //////////////////////////////////////////////////////////////////// 00037 class VrpnAnalogDevice : public ClientAnalogDevice { 00038 public: 00039 VrpnAnalogDevice(VrpnClient *client, const string &device_name, 00040 VrpnAnalog *vrpn_analog); 00041 virtual ~VrpnAnalogDevice(); 00042 00043 INLINE VrpnAnalog *get_vrpn_analog() const; 00044 00045 private: 00046 VrpnAnalog *_vrpn_analog; 00047 00048 public: 00049 static TypeHandle get_class_type() { 00050 return _type_handle; 00051 } 00052 static void init_type() { 00053 ClientAnalogDevice::init_type(); 00054 register_type(_type_handle, "VrpnAnalogDevice", 00055 ClientAnalogDevice::get_class_type()); 00056 } 00057 virtual TypeHandle get_type() const { 00058 return get_class_type(); 00059 } 00060 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00061 00062 private: 00063 static TypeHandle _type_handle; 00064 00065 friend class VrpnAnalog; 00066 }; 00067 00068 #include "vrpnAnalogDevice.I" 00069 00070 #endif