VR-Forces 4.0.4 Class Documentation
include/vrfobjcore/joyDevMgr.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2000 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: joyDevMgr.h,v $ $Revision: 1.15 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtJoyDeviceManager_H_
00013 #define DtJoyDeviceManager_H_
00014 
00015 #ifdef WIN32
00016 #define _WINSOCKAPI_
00017 #include <WTYPES.H>
00018 #endif
00019 
00020 
00021 #include "vrfutil/rdrWritr.h"
00022 #include "vrfutil/rwReal.h"
00023 #include "vrfutil/rwInt.h"
00024 #include "vrfutil/rwString.h"
00025 #include "vrfobjcore/vrfObject.h"
00026 
00029 
00030 class DtSimManager;
00031 class DtJoyDevice;
00032 class DtSimMessage;
00033 class DtIfJoyDeviceRequest;
00034 
00035 struct DtJoyInit;
00036 
00037 #include "vrfobjcore/vrfobjcoreDefines.h"
00038 class DT_DLL_vrfobjcore DtJoyDeviceManager : public DtReaderWriter
00039 {
00040 public:
00041    DtJoyDeviceManager(const DtString& name, DtSimManager* simManager, 
00042       DtReaderWriterRegistry* parentRegistry = NULL);
00043    DtJoyDeviceManager(const DtSymbolString& name, DtSimManager* simManager, 
00044       DtReaderWriterRegistry* parentRegistry = NULL);
00045 
00047    virtual ~DtJoyDeviceManager();
00048 
00050    virtual bool init();
00051 
00053    virtual void tick();
00054 
00056    virtual DtJoyDevice * joyDevice();
00057 
00059    virtual bool chooseDevice();
00060 
00061    virtual const DtJoyInit getDefaults();
00062 
00063 #ifdef WIN32
00064 
00065    virtual void setAppInstance(HINSTANCE hInstance);
00066    virtual void setConsoleWindow(HWND consoleWindow);
00067 #endif
00068 
00069 protected:
00070 
00072    static void joyDeviceRequestCallback(DtSimMessage* msg, void* usr);
00073 
00075    virtual void processJoyDeviceRequest(DtIfJoyDeviceRequest* request);
00076 
00078    DtJoyDeviceManager();
00079 
00081    virtual void setDefaults();
00082 
00084    DtJoyDeviceManager(const DtJoyDeviceManager& orig);
00085 
00087    DtJoyDeviceManager& operator=(const DtJoyDeviceManager& orig);
00088 
00089    DtJoyDevice*  myJoyDevice;
00090    DtSimManager* mySimManager;
00091    bool          myInitialized;
00092    DtString      myEntityUsingJoyDevice; 
00093 
00094 
00096    DtRwString        myDeviceType;
00097 
00098    DtRwReal          myTransSensitivity;
00099    DtRwReal          myTransGain;
00100    DtRwInt           myTransInvertX;
00101    DtRwInt           myTransInvertY;
00102    DtRwInt           myTransInvertZ;
00103    
00104    DtRwReal          myRotSensitivity;
00105    DtRwReal          myRotGain;
00106    DtRwInt           myRotInvertX;
00107    DtRwInt           myRotInvertY;
00108    DtRwInt           myRotInvertZ;
00109 
00110 #if 0 //! tripp, no sb
00111    int               myNtOrbPort;
00112 #endif
00113    
00114    DtRwInt           myWantPOV;
00115    
00116    DtRwString        myLinuxDevice;
00117 
00118 #ifdef WIN32
00119    HINSTANCE         myAppInstance;    
00120    HWND              myConsoleWindow;  
00121 #endif
00122 
00123    static const char theDeviceTypeName[];
00124 
00125    static const char theTransSensitivityName[];
00126    
00127    static const char theTransGainName[];
00128    static const char theTransInvertXName[];
00129    static const char theTransInvertYName[];
00130    static const char theTransInvertZName[];
00131    
00132    static const char theRotSensitivityName[];
00133    static const char theRotGainName[];
00134    static const char theRotInvertXName[];
00135    static const char theRotInvertYName[];
00136    static const char theRotInvertZName[];
00137    
00138    static const char theWantPOVName[];
00139    
00140    static const char theLinuxDeviceName[];
00141 };
00142 
00143 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)