00001 // Filename: vrpnDialDevice.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 VRPNDIALDEVICE_H 00020 #define VRPNDIALDEVICE_H 00021 00022 #include <pandabase.h> 00023 00024 #include <clientDialDevice.h> 00025 00026 class VrpnClient; 00027 class VrpnDial; 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Class : VrpnDialDevice 00031 // Description : The Panda interface to a VRPN dial device. This 00032 // object will be returned by VrpnClient::make_device(), 00033 // for attaching to a DialNode. 00034 // 00035 // This class does not need to be exported from the DLL. 00036 //////////////////////////////////////////////////////////////////// 00037 class VrpnDialDevice : public ClientDialDevice { 00038 public: 00039 VrpnDialDevice(VrpnClient *client, const string &device_name, 00040 VrpnDial *vrpn_dial); 00041 virtual ~VrpnDialDevice(); 00042 00043 INLINE VrpnDial *get_vrpn_dial() const; 00044 00045 private: 00046 VrpnDial *_vrpn_dial; 00047 00048 public: 00049 static TypeHandle get_class_type() { 00050 return _type_handle; 00051 } 00052 static void init_type() { 00053 ClientDialDevice::init_type(); 00054 register_type(_type_handle, "VrpnDialDevice", 00055 ClientDialDevice::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 VrpnDial; 00066 }; 00067 00068 #include "vrpnDialDevice.I" 00069 00070 #endif