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 #ifndef CYBGROUP_HC
00027 #define CYBGROUP_HC
00028
00029 #include <math.h>
00030 #include <stdio.h>
00031 #include <fstream>
00032
00033 #include "oaw/misc/stringc.h"
00034 #include "oaw/misc/arrayc.h"
00035 #include "oaw/ctk/cybnodec.h"
00036 #include "oaw/misc/vectorc.h"
00037 #include "../oawconfig.h"
00038
00039 OAW_BEGIN_NAMESPACE
00040
00041
00042 class CybChannelC;
00043 class CybTouchSensorC;
00044 class CybDragSensorC;
00045
00046
00047
00048
00052
00053 class OAW_DLLMAPPING CybGroupC : public CybNodeC
00054 {
00055
00056 public:
00057 CybGroupC(CybWorldC* pW);
00058 virtual ~CybGroupC();
00059 CybGroupC(const CybGroupC&);
00060 CybGroupC& operator = (const CybGroupC&);
00061 const ArrayC<CybNodeC*>& GetChildList();
00062 long GetChildListLength();
00063 virtual const CybBInfoC& GetBInfo();
00064
00065 virtual void AddChild(CybNodeC* pN);
00066 virtual void RemoveChild(CybNodeC* pN);
00067
00068 virtual void ToChannel(CybChannelC*,long flag);
00069
00070 virtual int SetNode(CybNodeC*);
00071 virtual void LoadVRML(char*&, const char*,long&);
00072
00073 virtual void Load_ROUTE(char*&, const char*,long&);
00074 virtual void Load_children(char*&, const char*,long&,short flag = 0);
00075 virtual void Load_bboxCenter(char*&, const char*,long&);
00076 virtual void Load_bboxSize(char*&, const char*,long&);
00077
00078 virtual void Load_PROTO(char*&, const char*,long&);
00079 virtual void Load_EXTERNPROTO(char*&, const char*,long&);
00080
00081 virtual void FinishInit();
00082 virtual void GetMessageAsObjectI(void*,long,SharedObjectC*);
00083
00084 virtual void SetEvent(long,const void*, BaseI*);
00085 virtual short GetFieldData(long,void* data);
00086 virtual long GetFieldEventID(const char*);
00087 virtual long GetFieldDataType(long);
00088
00089 virtual void SharedObjectDestroyed(SharedObjectC*);
00090
00091 protected:
00092 virtual void CreateNewCopy(CybNodeC*);
00093 void RemoveAllChildren();
00094 virtual void UpdateBInfo();
00095 protected:
00096 ArrayC<CybNodeC*> m_childNode;
00097 VectorC m_bboxSize;
00098 VectorC m_bboxCenter;
00099 CybTouchSensorC* m_pTouchSensor;
00100 ArrayC<CybDragSensorC*> m_dragSensors;
00101 short m_BInfoState;
00102 short m_BInfoIsChecked;
00103
00104 private:
00105 static char VRMLKeyStrList[][30];
00106 };
00107
00108 OAW_END_NAMESPACE
00109
00110
00111 #endif
00112