00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef CYBCYLINDERSENSOR_HC
00029 #define CYBCYLINDERSENSOR_HC
00030
00031 #include "oaw/ctk/cybdragsensorc.h"
00032 #include "oaw/ctk/cybwrlfields.h"
00033 #include "../oawconfig.h"
00034
00035 OAW_BEGIN_NAMESPACE
00036
00037
00038 class OAW_DLLMAPPING CybCylinderSensorC : public CybDragSensorC
00039 {
00040 public:
00041 CybCylinderSensorC(CybWorldC*);
00042 CybCylinderSensorC(const CybCylinderSensorC&);
00043 CybCylinderSensorC& operator = (const CybCylinderSensorC&);
00044 virtual void CreateNewCopy(CybNodeC* pNode);
00045 virtual ~CybCylinderSensorC();
00046
00047 virtual void FinishInit();
00048 virtual void SetEvent(long, const void*, BaseI*);
00049 virtual long GetFieldEventID(const char*);
00050 virtual long GetFieldDataType(long);
00051
00052 virtual void StartDrag(Vector3C vLineStart, Vector3C vLineEnd, Vector3C vIntersect);
00053 virtual void DoDrag(Vector3C vLineStart, Vector3C vLineEnd);
00054 virtual void EndDrag();
00055
00056 protected:
00057 virtual void LoadVRML(char*& iter, const char* iterEnd,long& znr);
00058
00059 void CheckRotation(SFFloat &r);
00060
00061
00062 void SendIsActive(SFBool b);
00063 void SendRotationChanged(SFFloat r);
00064 void SendTrackPointChanged(SFVec3f v);
00065 void SendOffsetChanged(SFFloat r);
00066
00067 protected:
00068 short m_bLoading;
00069 short m_bDragMode;
00070 SFFloat m_fRadius;
00071 SFVec3f m_vTrackStart;
00072 SFFloat m_fCurrent;
00073
00074 public:
00075
00076 SFBool m_bAutoOffset;
00077 SFFloat m_fDiskAngle;
00078 SFBool m_bEnabled;
00079 SFFloat m_fMaxAngle;
00080 SFFloat m_fMinAngle;
00081 SFFloat m_fOffset;
00082
00083
00084 static char VRMLKeyStrList[][30];
00085 };
00086
00087 OAW_END_NAMESPACE
00088
00089
00090 #endif