00001 //---------------------------------------------------------------------- 00002 // The Motion Strategy Library (MSL) 00003 //---------------------------------------------------------------------- 00004 // 00005 // Copyright (c) 1998-2000 Iowa State University and Steve LaValle. 00006 // All Rights Reserved. 00007 // 00008 // Permission to use, copy, and distribute this software and its 00009 // documentation is hereby granted free of charge, provided that 00010 // (1) it is not a component of a commercial product, and 00011 // (2) this notice appears in all copies of the software and 00012 // related documentation. 00013 // 00014 // Iowa State University and the author make no representations 00015 // about the suitability or fitness of this software for any purpose. 00016 // It is provided "as is" without express or implied warranty. 00017 //---------------------------------------------------------------------- 00018 00019 #ifndef MSL_RENDERLEDA_H 00020 #define MSL_RENDERLEDA_H 00021 00022 #include <LEDA/file.h> 00023 #include <LEDA/list.h> 00024 #include <LEDA/matrix.h> 00025 #include <LEDA/point.h> 00026 #include <LEDA/polygon.h> 00027 #include <LEDA/stream.h> 00028 #include <LEDA/string.h> 00029 #include <LEDA/vector.h> 00030 #include <LEDA/d3_point.h> 00031 #include <LEDA/window.h> 00032 00033 #include "3Dtriangle.h" 00034 #include "render.h" 00035 00036 #include <LEDA/REDEFINE_NAMES.h> 00037 00039 class RenderLeda: public Render 00040 { 00041 protected: 00042 window *W; 00043 array<list<polygon> > Env; 00044 array<list<polygon> > Bodies; 00045 bool FirstFrameDisplayed; 00046 vector PreviousFrame; 00047 public: 00048 int TransformDim; // Transformation dim: either 3 or 6 00049 00050 RenderLeda(); 00051 RenderLeda(string filepath); 00052 RenderLeda(Scene *s, string filepath); 00053 virtual ~RenderLeda(); 00054 00055 virtual void ShowCurrentAnimationFrame(); 00056 00057 virtual void Init(); 00058 virtual void Reset(); 00059 virtual void HandleEvents(); 00060 virtual void Terminate(); 00061 00062 void InitData(); 00063 void DrawBodies(const vector &x); 00064 void DrawEnv(); 00065 00066 virtual void DrawPath(); 00067 }; 00068 00069 00070 #include <LEDA/UNDEFINE_NAMES.h> 00071 00072 #endif