Eclipse 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-2019 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 /****************************************************************************/
14 // Produce a VTK output to use with Tools like ParaView
15 /****************************************************************************/
16 #ifndef MSVTKExport_h
17 #define MSVTKExport_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <utils/common/SUMOTime.h>
26 
27 
28 // ===========================================================================
29 // class declarations
30 // ===========================================================================
31 class OutputDevice;
32 class MSEdgeControl;
33 class MSEdge;
34 class MSLane;
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
49 class MSVTKExport {
50 public:
58  static void write(OutputDevice& of, SUMOTime timestep);
59 
60 private:
62  MSVTKExport(const MSVTKExport&);
63 
66 
68  static std::string trim(std::string istring);
69 
71  static bool ctype_space(const char c);
72 
74  static std::string List2String(std::vector<double> input);
75 
77  static std::vector<double> getSpeed();
78 
80  static std::vector<double> getPositions();
81 
83  static std::string getOffset(int nr);
84 
85 };
86 
87 
88 #endif
89 
90 /****************************************************************************/
SUMOTime.h
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
MSVTKExport::operator=
MSVTKExport & operator=(const MSVTKExport &)
Invalidated assignment operator.
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
MSVTKExport::MSVTKExport
MSVTKExport(const MSVTKExport &)
Invalidated copy constructor.
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
MSVTKExport::getPositions
static std::vector< double > getPositions()
Get a Vector of the Positions (x,y,z) of each vehicle in the actual timestep.
Definition: MSVTKExport.cpp:105
MSVTKExport
Produce a VTK output to use with Tools like ParaView.
Definition: MSVTKExport.h:49
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:78
MSVTKExport::write
static void write(OutputDevice &of, SUMOTime timestep)
Produce a VTK output to use with Tools like ParaView.
Definition: MSVTKExport.cpp:42
MSVTKExport::getSpeed
static std::vector< double > getSpeed()
Get a Vector with the speed values of each vehicle in the actual timestep.
Definition: MSVTKExport.cpp:81
MSVTKExport::List2String
static std::string List2String(std::vector< double > input)
Get a comma separated String from a Vector.
Definition: MSVTKExport.cpp:131
MSVTKExport::getOffset
static std::string getOffset(int nr)
Get a String with the indexes of all vehicles (needed in the VTk File)
Definition: MSVTKExport.cpp:151
config.h
MSEdgeControl
Stores edges and lanes, performs moving of vehicle.
Definition: MSEdgeControl.h:74
MSVTKExport::trim
static std::string trim(std::string istring)
Deletes the whitespaces at the end of a String.
Definition: MSVTKExport.cpp:173
MSVTKExport::ctype_space
static bool ctype_space(const char c)
Checks if there is a whitespace.
Definition: MSVTKExport.cpp:165