00001 /* 00002 Copyright (C) 2003 Carsten Winkelholz 00003 00004 Address: FGAN Forschungsgesellschaft für Angewandte Naturwissenschaften e. V. 00005 Neuenahrer Str. 20 00006 D - 53343 Wachtberg 00007 00008 Email: winkelholz@fgan.de 00009 00010 This program is free software; you can redistribute it and/or 00011 modify it under the terms of the GNU General Public License 00012 as published by the Free Software Foundation; either version 2 00013 of the License, or (at your option) any later version. 00014 00015 This program is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 along with this program; if not, write to the Free Software 00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00023 */ 00024 00025 #ifndef CYBSIXDOFMOUSESENSORC_H 00026 #define CYBSIXDOFMOUSESENSORC_H 00027 00028 #include "oaw/ctk/cybsensorc.h" 00029 #include "oaw/ctk/cybwrlfields.h" 00030 #include "oaw/misc/vectorc.h" 00031 #include "oaw/misc/quaternionc.h" 00032 #include "oaw/ctk/cybsixdofsensorc.h" 00033 #include "../oawconfig.h" 00034 00035 OAW_BEGIN_NAMESPACE 00036 00037 00038 class CybViewpointSensorC; 00039 00040 class OAW_DLLMAPPING CybSixDOFMouseSensorC : public CybSensorC 00041 { 00042 public: 00043 CybSixDOFMouseSensorC(CybWorldC*); 00044 CybSixDOFMouseSensorC(const CybSixDOFMouseSensorC&); 00045 CybSixDOFMouseSensorC& operator=(const CybSixDOFMouseSensorC&); 00046 00047 protected: 00048 virtual void CreateNewCopy(CybNodeC*); 00049 00050 public: 00051 virtual void LoadVRML(char*& iter, const char* iterEnd, long&); 00052 virtual void SetEvent(long srct, const void* pData, BaseI*); 00053 virtual long GetFieldDataType(long fieldID); 00054 virtual short GetFieldData(long fieldID, void* data); 00055 virtual long GetFieldEventID(const char* str); 00056 virtual void RouteData(); 00057 00058 public: 00059 virtual void FinishInit(); 00060 virtual void PreFinishInit(); 00061 virtual void SetPosition(const VectorC& v); 00062 virtual void SetOrientation(const QuaternionC&); 00063 virtual void SetButtonState(const short&); 00064 virtual VectorC GetPosition(); 00065 virtual QuaternionC GetOrientation(); 00066 virtual void GetPosOri(VectorC&, QuaternionC&); 00067 virtual short GetButtonState(); 00068 00069 virtual void SetInterfaceData(AnyC&); 00070 virtual void CopyInterfaceData (AnyC&,long maxLen); 00071 virtual long GetInterfaceDataMinLength(); 00072 00073 00074 public: 00075 // Field data 00076 SFVec3f m_vPosOut; 00077 SFRotation m_rQuatRotOut; 00078 SFInt32 m_nButtonOut; 00079 MFString m_mstrInterface; 00080 00081 //CybViewpointSensorC* m_pViewpointSensor; 00082 VectorC m_posBuf,m_pos; 00083 QuaternionC m_oriBuf,m_ori; 00084 //CybSixDOFSensorC* m_pSixDOFSensor; 00085 short m_buttonState; 00086 00087 private: 00088 static char VRMLKeyStrList[][30]; 00089 }; 00090 00091 OAW_END_NAMESPACE 00092 00093 00094 #endif
1.3-rc2