00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MSL_RENDERIV_H
00020 #define MSL_RENDERIV_H
00021
00022
00023
00024 #include "triangle.h"
00025 #include "render.h"
00026 #include "point.h"
00027
00028
00029 class SoSeparator;
00030 class SoXtExaminerViewer;
00031 class SoSensor;
00032 class SoTransform;
00033 class SoSwitch;
00034 class SoVertexProperty;
00035
00036
00037
00038
00040
00041
00042 class RenderIv: public Render
00043 {
00044 public:
00045
00046
00047 RenderIv();
00048 RenderIv(string filepath);
00049 RenderIv(Scene *s, string filepath);
00050 virtual ~RenderIv();
00051
00052
00053 virtual void Reset();
00054
00055
00056 virtual void Init();
00057 virtual void MainLoop(Gui *g);
00058
00059
00060 protected:
00061
00062
00063 static void _TimerCB(void* userData, SoSensor*);
00064 inline void _IdleFunction();
00065
00066
00067 SoSeparator* _ReadIvFile(const char *filename);
00068 SoSeparator* _InitObject(const string &fname);
00069 bool _InitBoundsDisplay();
00070 bool _InitPathDisplay();
00071 SoSeparator* _InitTriangleGeom(list<MSLTriangle> &triangles);
00072 bool _InitData();
00073
00074
00075 inline void _SetSwitch(SoSwitch *pSwitch, bool bFlag);
00076 inline void _UpdatePathDisplay();
00077 inline void _SetTransform(SoTransform* pTrans,
00078 double tx, double ty, double tz,
00079 double rx, double ry, double rz);
00080 inline void _UpdateBodies(const MSLVector &qConfig);
00081
00082
00083
00084
00085 SoXtExaminerViewer* _viewer;
00086 Gui* _pGui;
00087
00088 SoSeparator* _ivRoot;
00089 SoSeparator* _ivData;
00090
00091 SoSwitch* _ivBoundsSwitch;
00092 bool _bDisplayBounds;
00093
00094 SoSwitch* _ivPathSwitch;
00095 SoVertexProperty* _pPathVertexProp;
00096 int _pathFrames;
00097 bool _bDisplayPath;
00098
00099 list<SoTransform*> _bodyTrans;
00100 };
00101
00102
00103
00104 #endif