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 CYBINTERPOLATOR_HC
00029 #define CYBINTERPOLATOR_HC
00030
00031 #include <fstream>
00032
00033 #include "oaw/ctk/cybinterfacec.h"
00034 #include "oaw/ctk/cybwrlfields.h"
00035 #include "oaw/misc/arrayc.h"
00036 #include "oaw/misc/eventdesc.h"
00037 #include "../oawconfig.h"
00038
00039 OAW_BEGIN_NAMESPACE
00040
00041
00042
00043 class OAW_DLLMAPPING CybInterpolatorC : public CybInterfaceC
00044 {
00045 public:
00046 CybInterpolatorC(CybWorldC*);
00047 CybInterpolatorC(const CybInterpolatorC&);
00048 CybInterpolatorC& operator = (const CybInterpolatorC&);
00049
00050
00051 virtual void LoadVRML(char*& iter, const char* iterEnd,long& znr);
00052 virtual void SetEvent(long, const void*, BaseI*);
00053 virtual long GetFieldEventID(const char*);
00054 virtual long GetFieldDataType(long);
00055 virtual int AddSrc(CybNodeC*,const StringC&,const StringC&);
00056 virtual int AddDes(EventDesI*,const StringC&,long);
00057 virtual void FinishInit();
00058
00059 protected:
00060 virtual void CreateNewCopy(CybNodeC*);
00061 virtual void SendValueChanged()=0;
00062 virtual void SetDataToKeyIndex(long,double)=0;
00063 virtual void RouteData();
00064
00065
00066 virtual void SetKeyValue(const void*) { assert(0); }
00067 virtual long GetKeyValueType() { assert(0); return 0; }
00068 virtual long GetValueType() { assert(0); return 0; }
00069 long FindKeyIndex(double);
00070
00071 protected:
00072 ArrayC<double> m_mfKey;
00073 double m_fraction;
00074 long m_mfKeyOrigLength;
00075
00076
00077 static char VRMLKeyStrList[][30];
00078 };
00079
00080 OAW_END_NAMESPACE
00081
00082
00083 #endif
00084
00085
00086
00087
00088