O --- O
libPEDSIM Documentation
[HOME] [EXAMPLES] [ECOSYSTEM] [DOCUMENTATION] [DOWNLOAD]
O --- O
Public Member Functions | Protected Member Functions | List of all members
Ped::XMLOutputWriter Class Reference

#include <ped_outputwriter.h>

+ Inheritance diagram for Ped::XMLOutputWriter:

Public Member Functions

 XMLOutputWriter ()
 
 XMLOutputWriter (string scenarioname)
 
virtual ~XMLOutputWriter ()
 
virtual void writeTimeStep (long int timestep)
 
virtual void setScenarioName (string name)
 
virtual void drawLine (const Tvector &s, const Tvector &e, int duration=1, double red=1.0, double green=0.0, double blue=0.0)
 
virtual void writeMetrics (std::unordered_map< std::string, std::string > hash)
 
virtual void defineScene (Tscene &s)
 
virtual void addObstacle (Tobstacle &o)
 
virtual void addAgent (Tagent &a)
 
virtual void removeAgent (Tagent &a)
 
virtual void addWaypoint (Twaypoint &w)
 
virtual void setCamera (Ped::Tvector pos, Ped::Tvector direction, string id="")
 
virtual void drawAgent (Tagent &a)
 
virtual void drawObstacle (Tobstacle &o)
 
virtual void drawWaypoint (Twaypoint &w)
 

Protected Member Functions

virtual void write (string message)
 

Detailed Description

Class that defines a frame-by-frame proprietary XMLOutputWriter. For supported tags, see XML Messaging Format Specification.

Author
chgloor
Date
2016-07-02

Definition at line 110 of file ped_outputwriter.h.

Constructor & Destructor Documentation

Ped::XMLOutputWriter::XMLOutputWriter ( )

Constructor used to open the output mechanism.

Date
2016-07-02

Definition at line 42 of file ped_outputwriter.cpp.

Ped::XMLOutputWriter::XMLOutputWriter ( string  name)

Constructor used to open the output file

Date
2016-07-02
Parameters
scenarionameUsed to generate file filename

Definition at line 113 of file ped_outputwriter.cpp.

Ped::XMLOutputWriter::~XMLOutputWriter ( )
virtual

Constructor used to close the output file

Date
2016-07-02
Parameters
scenarionameUsed to generate file filename

Definition at line 139 of file ped_outputwriter.cpp.

Member Function Documentation

void Ped::XMLOutputWriter::drawAgent ( Tagent a)
virtual

Writes an agent's position

Date
2016-07-02
Parameters
aThe agent to be rendered.

Implements Ped::OutputWriter.

Definition at line 182 of file ped_outputwriter.cpp.

void Ped::XMLOutputWriter::drawLine ( const Tvector start,
const Tvector end,
int  duration = 1,
double  red = 1.0,
double  green = 0.0,
double  blue = 0.0 
)
virtual

Draws a user defined line. This can be used to draw any line primitive on the output device, e.g., but not limited to, forces, boundaries, directions.

Date
2016-10-11
Parameters
sStart point of the line
eEnd point of the line
durationThe item will be visible for that many timesteps. Default is 1 timestep if omitted. 1 means it will disappear emmidiately when a new timestep starts. This can be used for animations of dynamic values.
redThe amount of red in the line color (between 0.0 and 1.0). Default is white.
greenThe amount of green in the line color (between 0.0 and 1.0)
blueThe amount of blue in the line color (between 0.0 and 1.0)

Implements Ped::OutputWriter.

Definition at line 318 of file ped_outputwriter.cpp.

void Ped::XMLOutputWriter::drawObstacle ( Tobstacle o)
virtual

Writes an obstacle's position

Date
2016-10-10
Parameters
oThe obstacle to be rendered.

Implements Ped::OutputWriter.

Definition at line 220 of file ped_outputwriter.cpp.

void Ped::XMLOutputWriter::drawWaypoint ( Twaypoint w)
virtual

Writes a waypoint's position

Date
2016-10-16
Parameters
wThe waypoint to be rendered.

Implements Ped::OutputWriter.

Definition at line 254 of file ped_outputwriter.cpp.

void Ped::XMLOutputWriter::removeAgent ( Tagent a)
virtual

removes an agent from the scene

Date
2016-10-16
Parameters
aThe agent to be rendered.

Implements Ped::OutputWriter.

Definition at line 208 of file ped_outputwriter.cpp.

void Ped::XMLOutputWriter::setCamera ( Ped::Tvector  pos,
Ped::Tvector  direction,
string  id = "" 
)
virtual

Writes the camera position, used for 3D output renderes. They might ignore the camera position and use their own.

Date
2016-11-05
Parameters
posThe position of the camera.
directionThe direction the camera lens faces.
idThe ID of the camera, if there are more than one.

Implements Ped::OutputWriter.

Definition at line 237 of file ped_outputwriter.cpp.

void Ped::XMLOutputWriter::setScenarioName ( string  name)
virtual

Writes an scenario name

Date
2016-10-10
Parameters
nameThe name of the scenarion. It will be printed on the output device. E.g. rendered on screen on 2dvis' file output.

Implements Ped::OutputWriter.

Definition at line 280 of file ped_outputwriter.cpp.

void Ped::XMLOutputWriter::writeMetrics ( std::unordered_map< std::string, std::string >  hash)
virtual

Writes an list of metrics

Date
2016-10-17
Parameters
namehash A unordered_map of metrics to send. E.g. called like ow->writeMetrics({{"name1", "value1"}, {"name2", "value2"}});

Implements Ped::OutputWriter.

Definition at line 352 of file ped_outputwriter.cpp.

void Ped::XMLOutputWriter::writeTimeStep ( long int  timestep)
virtual

Writes the value of a timestep, indicating start of a new frame

Date
2016-07-02

Implements Ped::OutputWriter.

Definition at line 159 of file ped_outputwriter.cpp.


The documentation for this class was generated from the following files:
O --- O

⁠(c) Christian Gloor [ c|h|g|l|o|o|r|@|s|i|l|m|a|r|i|l|.|o|r|g| ]