SUMO - Simulation of Urban MObility
MSVTKExport.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2012-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // Produce a VTK output to use with Tools like ParaView
18 /****************************************************************************/
19 #ifndef MSVTKExport_h
20 #define MSVTKExport_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <utils/common/SUMOTime.h>
33 
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 class OutputDevice;
39 class MSEdgeControl;
40 class MSEdge;
41 class MSLane;
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
56 class MSVTKExport {
57 public:
65  static void write(OutputDevice& of, SUMOTime timestep);
66 
67 private:
69  MSVTKExport(const MSVTKExport&);
70 
73 
75  static std::string trim(std::string istring);
76 
78  static bool ctype_space(const char c);
79 
81  static std::string List2String(std::vector<double> input);
82 
84  static std::vector<double> getSpeed();
85 
87  static std::vector<double> getPositions();
88 
90  static std::string getOffset(int nr);
91 
92 };
93 
94 
95 #endif
96 
97 /****************************************************************************/
static bool ctype_space(const char c)
Checks if there is a whitespace.
Produce a VTK output to use with Tools like ParaView.
Definition: MSVTKExport.h:56
MSVTKExport(const MSVTKExport &)
Invalidated copy constructor.
static std::vector< double > getPositions()
Get a Vector of the Positions (x,y,z) of each vehicle in the actual timestep.
A road/street connecting two junctions.
Definition: MSEdge.h:80
Stores edges and lanes, performs moving of vehicle.
Definition: MSEdgeControl.h:73
static void write(OutputDevice &of, SUMOTime timestep)
Produce a VTK output to use with Tools like ParaView.
Definition: MSVTKExport.cpp:49
static std::vector< double > getSpeed()
Get a Vector with the speed values of each vehicle in the actual timestep.
Definition: MSVTKExport.cpp:88
static std::string List2String(std::vector< double > input)
Get a comma separated String from a Vector.
static std::string trim(std::string istring)
Deletes the whitespaces at the end of a String.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
long long int SUMOTime
Definition: TraCIDefs.h:51
static std::string getOffset(int nr)
Get a String with the indexes of all vehicles (needed in the VTk File)
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
MSVTKExport & operator=(const MSVTKExport &)
Invalidated assignment operator.