Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

cybgroupc.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999  Carsten Winkelholz
00003 
00004 Address:  FGAN Forschungsgesellschaft fr 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 
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 //#define TRUE 1
00047 //#define FALSE 0
00048 
00052 
00053 class OAW_DLLMAPPING CybGroupC : public CybNodeC
00054 {
00055   // Attributes
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   // Serialization
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 

Generated on Tue Jul 29 14:24:10 2003 for Open ActiveWrl by doxygen1.3-rc2