00001 #ifndef SIGEL_VISUALISATION_SIG_ENVIRONMENTRENDERER_H 00002 #define SIGEL_VISUALISATION_SIG_ENVIRONMENTRENDERER_H 00003 00004 #include "SIGEL_Visualisation/SIG_Renderer.h" 00005 #include "SIGEL_Environment/SIG_Environment.h" 00006 #include "SIGEL_Visualisation/SIG_ViewSettings.h" 00007 00008 #include <qlist.h> 00009 #include <pointvector.h> 00010 00011 namespace SIGEL_Visualisation 00012 { 00013 00017 class SIG_EnvironmentRenderer : public SIG_Renderer 00018 { 00019 public: 00020 00029 SIG_EnvironmentRenderer(SIGEL_Environment::SIG_Environment const &environment); 00030 00036 ~SIG_EnvironmentRenderer(); 00037 00045 void render(); 00046 00047 QString exportToPovray(); 00048 00049 QString createPovrayDeclarations(); 00050 00051 void setLookPoint( DL_vector newPosition ); 00052 00053 void setRenderMode( SIG_ViewSettings::renderModeType newRenderMode ); 00054 00055 void setPlaneColor( double red, 00056 double green, 00057 double blue ); 00058 00059 void setShowPlane( bool newShowPlane ); 00060 00061 void setShowGrid( bool newShowGrid ); 00062 00063 void setShowRobotPath( bool newShowRobotPath ); 00064 00065 void addRobotPathPoint( DL_vector newPoint ); 00066 00067 private: 00068 00074 void buildDisplayLists(); 00075 00082 void buildPlane(GLuint number); 00083 00084 void buildGrid(GLuint number); 00085 00086 void renderRobotPath(); 00087 00092 SIGEL_Environment::SIG_Environment const &environment; 00093 00094 GLint const fieldEdgeLength; 00095 00096 DL_vector lookPoint; 00097 00098 SIG_ViewSettings::renderModeType renderMode; 00099 00100 bool showPlane; 00101 00102 bool showGrid; 00103 00104 bool showRobotPath; 00105 00106 QList< DL_vector > robotPathPoints; 00107 }; 00108 00109 } 00110 00111 #endif // SIGEL_VISUALISATION_SIG_ENVIRONMENTRENDERER_H