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_GUIRRT_H 00020 #define MSL_GUIRRT_H 00021 00022 #include <LEDA/file.h> 00023 #include <LEDA/array.h> 00024 #include <LEDA/list.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/graph.h> 00031 #include <LEDA/window.h> 00032 #include <LEDA/menu.h> 00033 #include <LEDA/ps_file.h> 00034 00035 #include "gui.h" 00036 #include "rrt.h" 00037 00038 #include <LEDA/REDEFINE_NAMES.h> 00039 00041 00042 class GuiRRT: public Gui { 00043 public: 00044 double GifSize; // Size of animated gif 00045 bool DumpTrees; // Add the RRTs to the PS file output 00046 double LineWidth; 00047 double PSLineWidth; 00048 int DrawIndexX,DrawIndexY; 00049 list<vector> Path; 00050 RRT *rrt; 00051 GuiRRT(Render *render, RRT *r); 00052 virtual ~GuiRRT(){}; 00053 virtual void Start(); 00054 virtual void CreateControlWindow(); 00055 virtual void ButtonHandle(int b); 00056 void ResetRRT(); 00057 void WriteRRT(); 00058 void ReadRRT(); 00059 void DrawRRT(); 00060 void ReadAnimationFrames(); 00061 void WriteAnimationFrames(); 00062 void ReadPath(); 00063 void WritePath(); 00064 void PSDrawRRT(); 00065 }; 00066 00067 #include <LEDA/UNDEFINE_NAMES.h> 00068 00069 #endif