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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Produce a VTK output to use with Tools like ParaView
16 /****************************************************************************/
17 #ifndef MSVTKExport_h
18 #define MSVTKExport_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <utils/common/SUMOTime.h>
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 class OutputDevice;
33 class MSEdgeControl;
34 class MSEdge;
35 class MSLane;
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
50 class MSVTKExport {
51 public:
59  static void write(OutputDevice& of, SUMOTime timestep);
60 
61 private:
63  MSVTKExport(const MSVTKExport&);
64 
67 
69  static std::string trim(std::string istring);
70 
72  static bool ctype_space(const char c);
73 
75  static std::string List2String(std::vector<double> input);
76 
78  static std::vector<double> getSpeed();
79 
81  static std::vector<double> getPositions();
82 
84  static std::string getOffset(int nr);
85 
86 };
87 
88 
89 #endif
90 
91 /****************************************************************************/
static bool ctype_space(const char c)
Checks if there is a whitespace.
long long int SUMOTime
Definition: SUMOTime.h:36
Produce a VTK output to use with Tools like ParaView.
Definition: MSVTKExport.h:50
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:75
Stores edges and lanes, performs moving of vehicle.
Definition: MSEdgeControl.h:67
static void write(OutputDevice &of, SUMOTime timestep)
Produce a VTK output to use with Tools like ParaView.
Definition: MSVTKExport.cpp:43
static std::vector< double > getSpeed()
Get a Vector with the speed values of each vehicle in the actual timestep.
Definition: MSVTKExport.cpp:82
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:64
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:78
MSVTKExport & operator=(const MSVTKExport &)
Invalidated assignment operator.