GUIViewTraffic.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // A view on the simulation; this view is a microscopic one
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright 2001-2010 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef GUIViewTraffic_h
00020 #define GUIViewTraffic_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
00025 // ===========================================================================
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031 
00032 #include <string>
00033 #include <utils/geom/Boundary.h>
00034 #include <utils/geom/Position2D.h>
00035 #include <utils/common/RGBColor.h>
00036 #include <utils/geom/Position2DVector.h>
00037 #include <utils/shapes/Polygon2D.h>
00038 #include "GUISUMOViewParent.h"
00039 #include <utils/gui/windows/GUISUMOAbstractView.h>
00040 #include <utils/gui/globjects/GUIGlObject_AbstractAdd.h>
00041 
00042 #ifdef _WIN32
00043 #include <windows.h>
00044 #endif
00045 #include <GL/gl.h>
00046 
00047 
00048 // ===========================================================================
00049 // class declarations
00050 // ===========================================================================
00051 class GUINet;
00052 class GUISUMOViewParent;
00053 class GUIVehicle;
00054 class GUILaneWrapper;
00055 class MSRoute;
00056 
00057 
00058 // ===========================================================================
00059 // class definitions
00060 // ===========================================================================
00065 class GUIViewTraffic : public GUISUMOAbstractView {
00066 public:
00068     GUIViewTraffic(FXComposite *p, GUIMainWindow &app,
00069                    GUISUMOViewParent *parent, GUINet &net, FXGLVisual *glVis,
00070                    FXGLCanvas *share);
00072     virtual ~GUIViewTraffic();
00073 
00075     virtual void buildViewToolBars(GUIGlChildWindow &);
00076 
00077 
00081     void startTrack(int id);
00082 
00083 
00086     void stopTrack();
00087 
00088 
00092     int getTrackedID() const;
00093 
00094     void setColorScheme(const std::string &name);
00095 
00096 
00102     void showRoute(GUIVehicle * v, int index=-1) throw();
00103 
00105     void showBestLanes(GUIVehicle *v);
00106 
00112     void hideRoute(GUIVehicle * v, int index=-1) throw();
00113 
00115     void hideBestLanes(GUIVehicle *v);
00116 
00117     void showViewschemeEditor();
00118 
00119 
00120 
00127     bool amShowingRouteFor(GUIVehicle * v, int index=-1) throw();
00128 
00130     bool amShowingBestLanesFor(GUIVehicle *v);
00131 
00132     void onGamingClick(Position2D pos);
00133 
00134 protected:
00135     int doPaintGL(int mode, SUMOReal scale);
00136 
00137     void drawRoute(const VehicleOps &vo, int routeNo, SUMOReal darken);
00138     void drawBestLanes(const VehicleOps &vo);
00139 
00140     void draw(const MSRoute &r);
00141 
00142 private:
00143     int myTrackedID;
00144 
00145 protected:
00146     GUIViewTraffic() { }
00147 
00148 };
00149 
00150 
00151 #endif
00152 
00153 /****************************************************************************/
00154 

Generated on Wed May 5 00:06:30 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6