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
00029
00030
00031
00032 #ifndef CYBSPHERESENSOR_HC
00033 #define CYBSPHERESENSOR_HC
00034
00035 #include "oaw/ctk/cybdragsensorc.h"
00036 #include "oaw/ctk/cybwrlfields.h"
00037 #include "../oawconfig.h"
00038
00039 OAW_BEGIN_NAMESPACE
00040
00041
00042 class OAW_DLLMAPPING CybSphereSensorC : public CybDragSensorC
00043 {
00044 public:
00045 CybSphereSensorC(CybWorldC*);
00046 CybSphereSensorC(const CybSphereSensorC&);
00047 CybSphereSensorC& operator = (const CybSphereSensorC&);
00048 virtual void CreateNewCopy(CybNodeC* pNode);
00049 virtual ~CybSphereSensorC();
00050
00051 virtual void SetEvent(long, const void*, BaseI*);
00052 virtual long GetFieldEventID(const char*);
00053 virtual long GetFieldDataType(long);
00054
00055 virtual void StartDrag(Vector3C vLineStart, Vector3C vLineEnd, Vector3C vIntersect);
00056 virtual void DoDrag(Vector3C vLineStart, Vector3C vLineEnd);
00057 virtual void EndDrag();
00058
00059 protected:
00060 virtual void LoadVRML(char*& iter, const char* iterEnd,long& znr);
00061
00062
00063 void SendIsActive(SFBool b);
00064 void SendRotationChanged(SFRotation r);
00065 void SendTrackPointChanged(SFVec3f v);
00066 void SendOffsetChanged(SFRotation r);
00067
00068 protected:
00069 short m_bLoading;
00070 SFFloat m_fRadius;
00071 SFVec3f m_vTrackStart;
00072 SFRotation m_vCurrent;
00073
00074 public:
00075
00076 SFBool m_bAutoOffset;
00077 SFBool m_bEnabled;
00078 SFRotation m_vOffset;
00079
00080
00081 static char VRMLKeyStrList[][30];
00082 };
00083
00084 OAW_END_NAMESPACE
00085
00086
00087 #endif