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