Eclipse SUMO - Simulation of Urban MObility
|
Produce a VTK output to use with Tools like ParaView. More...
#include <MSVTKExport.h>
Static Public Member Functions | |
static void | write (OutputDevice &of, SUMOTime timestep) |
Produce a VTK output to use with Tools like ParaView. | |
Private Member Functions | |
MSVTKExport (const MSVTKExport &) | |
Invalidated copy constructor. | |
MSVTKExport & | operator= (const MSVTKExport &) |
Invalidated assignment operator. | |
Static Private Member Functions | |
static bool | ctype_space (const char c) |
Checks if there is a whitespace. | |
static std::string | getOffset (int nr) |
Get a String with the indexes of all vehicles (needed in the VTk File) | |
static std::vector< double > | getPositions () |
Get a Vector of the Positions (x,y,z) of each vehicle in the actual timestep. | |
static std::vector< double > | getSpeed () |
Get a Vector with the speed values of each vehicle in the actual timestep. | |
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. | |
Produce a VTK output to use with Tools like ParaView.
The class offers a static method, which writes VTK Files for each timestep of the simulation, where at least one vehicle is present.
Definition at line 47 of file MSVTKExport.h.
|
private |
Invalidated copy constructor.
|
staticprivate |
Checks if there is a whitespace.
Definition at line 164 of file MSVTKExport.cpp.
Referenced by trim().
|
staticprivate |
Get a String with the indexes of all vehicles (needed in the VTk File)
Definition at line 150 of file MSVTKExport.cpp.
References trim().
Referenced by write().
|
staticprivate |
Get a Vector of the Positions (x,y,z) of each vehicle in the actual timestep.
Definition at line 104 of file MSVTKExport.cpp.
References MSNet::getInstance(), MSVehicle::getPosition(), MSNet::getVehicleControl(), MSVehicle::isOnRoad(), MSVehicleControl::loadedVehBegin(), MSVehicleControl::loadedVehEnd(), Position::x(), Position::y(), and Position::z().
Referenced by write().
|
staticprivate |
Get a Vector with the speed values of each vehicle in the actual timestep.
Definition at line 80 of file MSVTKExport.cpp.
References MSNet::getInstance(), MSVehicle::getLane(), MSVehicle::getPositionOnLane(), MSLane::getShape(), MSVehicle::getSpeed(), MSNet::getVehicleControl(), MSVehicle::isOnRoad(), MSVehicleControl::loadedVehBegin(), MSVehicleControl::loadedVehEnd(), and PositionVector::positionAtOffset().
Referenced by write().
|
staticprivate |
Get a comma separated String from a Vector.
Definition at line 130 of file MSVTKExport.cpp.
References trim().
Referenced by write().
|
private |
Invalidated assignment operator.
|
staticprivate |
Deletes the whitespaces at the end of a String.
Definition at line 172 of file MSVTKExport.cpp.
References ctype_space(), and trim().
Referenced by getOffset(), List2String(), and trim().
|
static |
Produce a VTK output to use with Tools like ParaView.
[in] | of | The output device to use |
[in] | ec | The EdgeControl which holds the edges to write |
[in] | timestep | The current time step |
IOError | If an error on writing occurs (!!! not yet implemented) |
Definition at line 41 of file MSVTKExport.cpp.
References getOffset(), getPositions(), getSpeed(), and List2String().
Referenced by MSNet::writeOutput().