SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIPointOfInterest Class Reference

#include <GUIPointOfInterest.h>

Inheritance diagram for GUIPointOfInterest:
PointOfInterest GUIGlObject_AbstractAdd RGBColor Position Named GUIGlObject

Public Member Functions

void add (const Position &pos)
 Adds the given position to this one.
void add (SUMOReal dx, SUMOReal dy)
 Adds the given position to this one.
void add (SUMOReal dx, SUMOReal dy, SUMOReal dz)
 Adds the given position to this one.
bool almostSame (const Position &p2, SUMOReal maxDiv=POSITION_EPS) const
SUMOReal blue () const
 Returns the blue-amount of the color.
RGBColor changedBrightness (SUMOReal change)
 Returns a new color with altered brightness.
Position crossProduct (const Position &pos)
 returns the cross product between this point and the second one
SUMOReal distanceSquaredTo (const Position &p2) const
SUMOReal distanceSquaredTo2D (const Position &p2) const
SUMOReal distanceTo (const Position &p2) const
 returns the euclidean distance in 3 dimension
SUMOReal distanceTo2D (const Position &p2) const
 returns the euclidean distance in the x-y-plane
SUMOReal dotProduct (const Position &pos)
 returns the dot product (scalar product) between this point and the second one
virtual void drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
 Draws additional, user-triggered visualisations.
void drawName (const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
const std::string & getID () const
 Returns the id.
int getLayer () const
 Returns the layer the object is located in.
const std::string & getType () const
 Returns the (abstract) type of the poi.
SUMOReal green () const
 Returns the green-amount of the color.
 GUIPointOfInterest (int layer, const std::string &id, const std::string &type, const Position &p, const RGBColor &c)
 Constructor.
void mul (SUMOReal val)
 Multiplies both positions with the given value.
void mul (SUMOReal mx, SUMOReal my)
 Multiplies position with the given values.
void mul (SUMOReal mx, SUMOReal my, SUMOReal mz)
 Multiplies position with the given values.
void norm2d ()
bool operator!= (const RGBColor &c) const
bool operator!= (const Position &p2) const
Position operator* (SUMOReal scalar) const
Position operator+ (const Position &p2) const
Position operator- (const Position &p2) const
bool operator== (const RGBColor &c) const
bool operator== (const Position &p2) const
SUMOReal red () const
 Returns the red-amount of the color.
void reshiftRotate (SUMOReal xoff, SUMOReal yoff, SUMOReal rot)
void set (SUMOReal x, SUMOReal y)
void set (SUMOReal x, SUMOReal y, SUMOReal z)
void set (const Position &pos)
void set (SUMOReal r, SUMOReal g, SUMOReal b)
 assigns new values
void setID (const std::string &newID)
 resets the id
void setType (const std::string &type)
 Sets a new type.
void sub (SUMOReal dx, SUMOReal dy)
 Substracts the given position from this one.
void sub (SUMOReal dx, SUMOReal dy, SUMOReal dz)
 Substracts the given position from this one.
void sub (const Position &pos)
 Substracts the given position from this one.
SUMOReal x () const
 Returns the x-position.
SUMOReal y () const
 Returns the y-position.
SUMOReal z () const
 Returns the z-position.
virtual ~GUIPointOfInterest ()
 Destructor.
inherited from GUIGlObject
GUIGLObjectPopupMenugetPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own popup-menu.
GUIParameterTableWindowgetParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own parameter window.
Boundary getCenteringBoundary () const
 Returns the boundary to which the view shall be centered in order to show the object.
void drawGL (const GUIVisualizationSettings &s) const
 Draws the object.
Atomar getter methods
const std::string & getFullName () const
 Returns the full name appearing in the tool tip.
GUIGlID getGlID () const
 Returns the numerical id of the object.
interfaces to be implemented by derived classes
const std::string & getMicrosimID () const
 Returns the id of the object as known to microsim.
void setMicrosimID (const std::string &newID)
 Changes the microsimID of the object (happens in NETEDIT)
GUIGlObjectType getType () const
 Returns the type of the object as coded in GUIGlObjectType.
Parameter table window I/O
void addParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was opened.
void removeParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was closed.

Static Public Member Functions

static void clearDictionary ()
 Clears the dictionary (the objects will not be deleted)
static RGBColor fromHSV (SUMOReal h, SUMOReal s, SUMOReal v)
 Converts the given hsv-triplet to rgb.
static GUIGlObject_AbstractAddget (const std::string &name)
 Returns a named object.
static RGBColor getDefaultColor ()
 Returns the default color by parsing DEFAULT_COLOR_STRING.
static std::vector< GUIGlIDgetIDList ()
 Returns the list of gl-ids of all additional objects.
static const std::vector
< GUIGlObject_AbstractAdd * > & 
getObjectList ()
 Returns the list of all additional objects.
static RGBColor interpolate (const RGBColor &minColor, const RGBColor &maxColor, SUMOReal weight)
 Interpolates between two colors.
static RGBColor parseColor (const std::string &coldef) throw (EmptyData, NumberFormatException)
 Parses a color information.
static RGBColor parseColorReporting (const std::string &coldef, const std::string &objecttype, const char *objectid, bool report, bool &ok)
 Parses a color information.

Static Public Attributes

static const RGBColor DEFAULT_COLOR = RGBColor::parseColor(RGBColor::DEFAULT_COLOR_STRING)
 The default color (for vehicle types and vehicles)
static const std::string DEFAULT_COLOR_STRING = "1,1,0"
 The string description of the default color.
static StringBijection
< GUIGlObjectType
TypeNames
 associates object types with strings

Protected Member Functions

void setPrefix (const std::string &prefix)
helper methods for building popup-menus
void buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
 Builds the header.
void buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to center to the object.
void buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds entries which allow to copy the name / typed name into the clipboard.
void buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to (de)select the object.
void buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the parameter window.
void buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
void buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the manipulator window.

Protected Attributes

std::string myID
 The name of the object.
int myLayer
 The layer this object is located in.
std::string myType
 the type of the poi

Static Protected Attributes

static std::vector
< GUIGlObject_AbstractAdd * > 
myObjectList
 The list of all addtional objects currently loaded.
static std::map< std::string,
GUIGlObject_AbstractAdd * > 
myObjects
 Map from names of loaded additional objects to the objects themselves.

Detailed Description

Definition at line 52 of file GUIPointOfInterest.h.

Constructor & Destructor Documentation

GUIPointOfInterest::GUIPointOfInterest ( int  layer,
const std::string &  id,
const std::string &  type,
const Position p,
const RGBColor c 
)

Constructor.

Parameters
[in]idStorageThe gl-id storage for giving this object an gl-id
[in]layerThe layer the PoI will be located in
[in]idThe name of the PoI
[in]typeThe type of the PoI
[in]pThe position of the PoI
[in]cThe color of the PoI

Definition at line 58 of file GUIPointOfInterest.cpp.

GUIPointOfInterest::~GUIPointOfInterest ( )
virtual

Destructor.

Definition at line 68 of file GUIPointOfInterest.cpp.

Member Function Documentation

void Position::add ( SUMOReal  dx,
SUMOReal  dy 
)
inlineinherited

Adds the given position to this one.

Definition at line 126 of file Position.h.

References Position::myX, and Position::myY.

void Position::add ( SUMOReal  dx,
SUMOReal  dy,
SUMOReal  dz 
)
inlineinherited

Adds the given position to this one.

Definition at line 132 of file Position.h.

References Position::myX, Position::myY, and Position::myZ.

void GUIGlObject::addParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was opened.

Parameters
[in]wThe opened parameter window

Definition at line 191 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

bool Position::almostSame ( const Position p2,
SUMOReal  maxDiv = POSITION_EPS 
) const
inlineinherited
void GUIGlObject::buildCenterPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited
void GUIGlObject::buildNameCopyPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds entries which allow to copy the name / typed name into the clipboard.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 138 of file GUIGlObject.cpp.

References MID_COPY_NAME, and MID_COPY_TYPED_NAME.

Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon::getPopUpMenu(), getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), and GUIEdge::getPopUpMenu().

void GUIGlObject::buildPopupHeader ( GUIGLObjectPopupMenu ret,
GUIMainWindow app,
bool  addSeparator = true 
)
protectedinherited
void GUIGlObject::buildPositionCopyEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 170 of file GUIGlObject.cpp.

References GeoConvHelper::getFinal(), MID_COPY_CURSOR_GEOPOSITION, and MID_COPY_CURSOR_POSITION.

Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon::getPopUpMenu(), getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIEdge::getPopUpMenu(), and GUINet::getPopUpMenu().

void GUIGlObject::buildSelectionPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited
void GUIGlObject::buildShowManipulatorPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the manipulator window.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 182 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.

Referenced by GUITriggeredRerouter::getPopUpMenu(), and GUILaneSpeedTrigger::getPopUpMenu().

void GUIGlObject::buildShowParamsPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the parameter window.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 161 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWPARS.

Referenced by GUIDetectorWrapper::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIEdge::getPopUpMenu(), and GUINet::getPopUpMenu().

RGBColor RGBColor::changedBrightness ( SUMOReal  change)
inherited

Returns a new color with altered brightness.

Parameters
[in]changeThe absolute change applied to all channels (within bounds)
Returns
The new color

Definition at line 107 of file RGBColor.cpp.

References RGBColor::blue(), RGBColor::green(), MAX2(), MIN2(), RGBColor::myBlue, RGBColor::myGreen, RGBColor::myRed, RGBColor::red(), RGBColor::RGBColor(), and SUMOReal.

Referenced by drawAction_drawVehicleAsPoly().

void GUIGlObject_AbstractAdd::clearDictionary ( )
staticinherited

Clears the dictionary (the objects will not be deleted)

!! delete (*i).second;

Definition at line 65 of file GUIGlObject_AbstractAdd.cpp.

References GUIGlObject_AbstractAdd::myObjectList, and GUIGlObject_AbstractAdd::myObjects.

Referenced by GUINet::~GUINet().

Position Position::crossProduct ( const Position pos)
inlineinherited

returns the cross product between this point and the second one

Definition at line 229 of file Position.h.

References Position::myX, Position::myY, Position::myZ, and Position::Position().

SUMOReal Position::distanceSquaredTo ( const Position p2) const
inlineinherited

Definition at line 213 of file Position.h.

References Position::myX, Position::myY, and Position::myZ.

Referenced by GeomHelper::distancePointLine(), and Position::distanceTo().

SUMOReal Position::distanceSquaredTo2D ( const Position p2) const
inlineinherited

Definition at line 224 of file Position.h.

References Position::myX, and Position::myY.

Referenced by Position::distanceTo2D().

SUMOReal Position::dotProduct ( const Position pos)
inlineinherited

returns the dot product (scalar product) between this point and the second one

Definition at line 237 of file Position.h.

References Position::myX, Position::myY, and Position::myZ.

virtual void GUIGlObject::drawGLAdditional ( GUISUMOAbstractView *const  parent,
const GUIVisualizationSettings s 
) const
inlinevirtualinherited

Draws additional, user-triggered visualisations.

Parameters
[in]parentThe view
[in]sThe settings for the current view (may influence drawing)

Reimplemented in GUIVehicle.

Definition at line 182 of file GUIGlObject.h.

References UNUSED_PARAMETER.

RGBColor RGBColor::fromHSV ( SUMOReal  h,
SUMOReal  s,
SUMOReal  v 
)
staticinherited

Converts the given hsv-triplet to rgb.

Parameters
[in]hHue (0-360)
[in]sSaturation (0-1)
[in]vValue (0-1)
Returns
The color as RGB
Author
Alvy Ray Smith (http://www.alvyray.com/default.htm)

Definition at line 176 of file RGBColor.cpp.

References RGBColor::RGBColor().

Referenced by GUIVehicle::setFunctionalColor().

GUIGlObject_AbstractAdd * GUIGlObject_AbstractAdd::get ( const std::string &  name)
staticinherited

Returns a named object.

Definition at line 76 of file GUIGlObject_AbstractAdd.cpp.

References GUIGlObject_AbstractAdd::myObjects.

Boundary GUIPointOfInterest::getCenteringBoundary ( ) const
virtual

Returns the boundary to which the view shall be centered in order to show the object.

Returns
The boundary the object is within
See Also
GUIGlObject::getCenteringBoundary

Implements GUIGlObject.

Definition at line 96 of file GUIPointOfInterest.cpp.

References Boundary::add(), Boundary::grow(), Position::x(), and Position::y().

RGBColor RGBColor::getDefaultColor ( )
staticinherited

Returns the default color by parsing DEFAULT_COLOR_STRING.

Returns
The default color

Definition at line 155 of file RGBColor.cpp.

References RGBColor::DEFAULT_COLOR_STRING, and RGBColor::parseColor().

Referenced by MSRouteHandler::openRoute().

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Reimplemented in MS_E2_ZS_CollectorOverLanes.

Definition at line 61 of file Named.h.

References Named::myID.

Referenced by MSDetectorControl::add(), ShapeContainer::add(), RORouteDef_Alternatives::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIImporter_OpenDrive::addE2EConnectionsSecure(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), NIVisumTL::build(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectEdges(), NBOwnTLDef::collectLinks(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::connections_sorter(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), MSNet::getBusStopID(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), MSLane::moveCritical(), MSVehicle::MSVehicle(), RORDLoader_SUMOBase::myCharacters(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedTLDef::SignalGroup::patchTYellow(), RORouteDef_Complete::preComputeCurrentRoute(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), NWWriter_SUMO::prohibitionConnection(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), MSLane::setCritical(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), RORDLoader_SUMOBase::startRoute(), NBEdge::startShapeAt(), NIXMLConnectionsHandler::validateLaneInfo(), MSInstantInductLoop::write(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), MSInductLoop::writeTypedXMLOutput(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

std::vector< GUIGlID > GUIGlObject_AbstractAdd::getIDList ( )
staticinherited

Returns the list of gl-ids of all additional objects.

Definition at line 92 of file GUIGlObject_AbstractAdd.cpp.

References GUIGlObject_AbstractAdd::myObjectList.

Referenced by GUISUMOViewParent::onCmdLocate().

int GUIPointOfInterest::getLayer ( ) const

Returns the layer the object is located in.

Definition at line 122 of file GUIPointOfInterest.cpp.

References myLayer.

Referenced by drawGL().

const std::string& GUIGlObject::getMicrosimID ( ) const
inlineinherited

Returns the id of the object as known to microsim.

Returns
The id of the object

Definition at line 146 of file GUIGlObject.h.

References GUIGlObject::myMicrosimID.

Referenced by GUIGlObject::createFullName(), GUIGlObject::drawName(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), and GUIGLObjectPopupMenu::onCmdCopyName().

const std::vector< GUIGlObject_AbstractAdd * > & GUIGlObject_AbstractAdd::getObjectList ( )
staticinherited

Returns the list of all additional objects.

Definition at line 86 of file GUIGlObject_AbstractAdd.cpp.

References GUIGlObject_AbstractAdd::myObjectList.

GUIParameterTableWindow * GUIPointOfInterest::getParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own parameter window.

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window
See Also
GUIGlObject::getParameterWindow

Implements GUIGlObject.

Definition at line 89 of file GUIPointOfInterest.cpp.

GUIGLObjectPopupMenu * GUIPointOfInterest::getPopUpMenu ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own popup-menu.

Parameters
[in]appThe application needed to build the popup-menu
[in]parentThe parent window needed to build the popup-menu
Returns
The built popup-menu
See Also
GUIGlObject::getPopUpMenu

Implements GUIGlObject.

Definition at line 72 of file GUIPointOfInterest.cpp.

References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildNameCopyPopupEntry(), GUIGlObject::buildPopupHeader(), GUIGlObject::buildPositionCopyEntry(), GUIGlObject::buildSelectionPopupEntry(), and PointOfInterest::myType.

const std::string& PointOfInterest::getType ( ) const
inlineinherited

Returns the (abstract) type of the poi.

Returns
The polygon's (abstract) type

Definition at line 69 of file PointOfInterest.h.

References PointOfInterest::myType.

Referenced by TraCIServerAPI_POI::processGet().

RGBColor RGBColor::interpolate ( const RGBColor minColor,
const RGBColor maxColor,
SUMOReal  weight 
)
staticinherited

Interpolates between two colors.

The interpolated color is calculated as a weighted average of the RGB values of minColor and maxColor, giving weight to maxColor and 1-weight to minColor.

Parameters
[in]minColorThe color to interpolate from
[in]maxColorThe color to interpolate to
[in]weightThe weight of the first color
Returns
The interpolated color

Definition at line 161 of file RGBColor.cpp.

References RGBColor::myBlue, RGBColor::myGreen, RGBColor::myRed, RGBColor::RGBColor(), and SUMOReal.

Referenced by GUIColorScheme::getColor().

void Position::mul ( SUMOReal  val)
inlineinherited
void Position::mul ( SUMOReal  mx,
SUMOReal  my 
)
inlineinherited

Multiplies position with the given values.

Definition at line 106 of file Position.h.

References Position::myX, and Position::myY.

void Position::mul ( SUMOReal  mx,
SUMOReal  my,
SUMOReal  mz 
)
inlineinherited

Multiplies position with the given values.

Definition at line 112 of file Position.h.

References Position::myX, Position::myY, and Position::myZ.

void Position::norm2d ( )
inlineinherited

Definition at line 158 of file Position.h.

References Position::myX, Position::myY, and SUMOReal.

Referenced by NBNode::getEmptyDir().

bool RGBColor::operator!= ( const RGBColor c) const
inherited

Definition at line 100 of file RGBColor.cpp.

References RGBColor::myBlue, RGBColor::myGreen, and RGBColor::myRed.

bool Position::operator!= ( const Position p2) const
inlineinherited

Definition at line 197 of file Position.h.

References Position::myX, Position::myY, and Position::myZ.

Position Position::operator* ( SUMOReal  scalar) const
inlineinherited

Definition at line 189 of file Position.h.

References Position::myX, Position::myY, Position::myZ, and Position::Position().

Position Position::operator+ ( const Position p2) const
inlineinherited

Definition at line 181 of file Position.h.

References Position::myX, Position::myY, Position::myZ, and Position::Position().

Position Position::operator- ( const Position p2) const
inlineinherited

Definition at line 185 of file Position.h.

References Position::myX, Position::myY, Position::myZ, and Position::Position().

bool RGBColor::operator== ( const RGBColor c) const
inherited

Definition at line 93 of file RGBColor.cpp.

References RGBColor::myBlue, RGBColor::myGreen, and RGBColor::myRed.

bool Position::operator== ( const Position p2) const
inlineinherited

Definition at line 193 of file Position.h.

References Position::myX, Position::myY, and Position::myZ.

RGBColor RGBColor::parseColor ( const std::string &  coldef) throw (EmptyData, NumberFormatException)
staticinherited

Parses a color information.

It is assumed that the color is stored as "<RED>,<GREEN>,<BLUE>" And each color is represented as a SUMOReal.

Parameters
[in]coldefThe color definition to parse
Returns
The parsed color
Exceptions
EmptyDataIf the definition has less than three entries
NumberFormatExceptionIf one of the components is not numeric

Definition at line 116 of file RGBColor.cpp.

References TplConvert< E >::_2SUMOReal(), StringTokenizer::next(), StringTokenizer::size(), and SUMOReal.

Referenced by RGBColor::getDefaultColor(), PCLoaderVisum::load(), PCLoaderArcView::load(), PCLoaderOSM::loadIfSet(), PCLoaderDlrNavteq::loadPOIFile(), PCLoaderDlrNavteq::loadPolyFile(), PCLoaderXML::myStartElement(), RGBColor::parseColorReporting(), and SUMOVehicleParserHelper::parseCommonAttributes().

RGBColor RGBColor::parseColorReporting ( const std::string &  coldef,
const std::string &  objecttype,
const char *  objectid,
bool  report,
bool ok 
)
staticinherited

Parses a color information.

It is assumed that the color is stored as "<RED>,<GREEN>,<BLUE>" And each color is represented as a SUMOReal.

Parameters
[in]coldefThe color definition to parse
[in]objecttypeThe type of the currently parsed object
[in]objectidThe id of the currently parsed object
[in]reportWhether errors shall be reported
[in,out]okWhether parsing was successful
Returns
The parsed color
Exceptions
EmptyDataIf the definition has less than three entries
NumberFormatExceptionIf one of the components is not numeric

Definition at line 129 of file RGBColor.cpp.

References RGBColor::parseColor(), RGBColor::RGBColor(), UNUSED_PARAMETER, and WRITE_ERROR.

Referenced by NLHandler::addPOI(), NLHandler::addPoly(), SUMOVehicleParserHelper::beginVTypeParsing(), GUISettingsHandler::myStartElement(), MSRouteHandler::openRoute(), GUISettingsHandler::parseTextSettings(), and RORDLoader_SUMOBase::startRoute().

void GUIGlObject::removeParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was closed.

Parameters
[in]wThe closed parameter window

Definition at line 197 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().

void Position::reshiftRotate ( SUMOReal  xoff,
SUMOReal  yoff,
SUMOReal  rot 
)
inlineinherited
void Position::set ( SUMOReal  x,
SUMOReal  y,
SUMOReal  z 
)
inlineinherited
void Position::set ( const Position pos)
inlineinherited

Definition at line 91 of file Position.h.

References Position::myX, Position::myY, and Position::myZ.

void RGBColor::set ( SUMOReal  r,
SUMOReal  g,
SUMOReal  b 
)
inherited

assigns new values

Parameters
[in]rThe red component's value
[in]gThe green component's value
[in]bThe blue component's value

Definition at line 74 of file RGBColor.cpp.

References RGBColor::myBlue, RGBColor::myGreen, and RGBColor::myRed.

Referenced by TraCIServerAPI_Vehicle::processSet().

void Named::setID ( const std::string &  newID)
inlineinherited

resets the id

Definition at line 67 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

void GUIGlObject::setMicrosimID ( const std::string &  newID)
inherited

Changes the microsimID of the object (happens in NETEDIT)

Definition at line 112 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.

void GUIGlObject::setPrefix ( const std::string &  prefix)
protectedinherited
void PointOfInterest::setType ( const std::string &  type)
inlineinherited

Sets a new type.

Parameters
[in]typeThe new type to use

Definition at line 77 of file PointOfInterest.h.

References PointOfInterest::myType.

Referenced by TraCIServerAPI_POI::processSet().

void Position::sub ( SUMOReal  dx,
SUMOReal  dy 
)
inlineinherited
void Position::sub ( SUMOReal  dx,
SUMOReal  dy,
SUMOReal  dz 
)
inlineinherited

Substracts the given position from this one.

Definition at line 145 of file Position.h.

References Position::myX, Position::myY, and Position::myZ.

void Position::sub ( const Position pos)
inlineinherited

Substracts the given position from this one.

Definition at line 152 of file Position.h.

References Position::myX, Position::myY, and Position::myZ.

SUMOReal Position::x ( ) const
inlineinherited

Returns the x-position.

Definition at line 63 of file Position.h.

References Position::myX.

Referenced by Boundary::add(), Line::add(), NIXMLNodesHandler::addNode(), Boundary::around(), PositionVector::around(), Line::atan2Angle(), Line::atan2DegreeAngle(), NIImporter_OpenDrive::calculateStraightEndPoint(), GeoConvHelper::cartesian2geo(), GUIDanielPerspectiveChanger::centerTo(), NGRandomNetBuilder::checkAngles(), TraCIServerAPI_Simulation::commandPositionConversion(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShape(), NGRandomNetBuilder::createNewNode(), GeomHelper::distancePointLine(), GLHelper::drawBoxLine(), GLHelper::drawBoxLines(), GLHelper::drawFilledPoly(), GUITrafficLightLogicWrapper::drawGL(), drawGL(), GUITriggeredRerouter::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIVehicle::drawGL(), GUIBusStop::drawGL(), GUIEdge::drawGL(), GUIVehicle::drawGLAdditional(), GLHelper::drawLine(), GUIE3Collector::MyWrapper::drawSingleCrossing(), GLHelper::drawText(), GLHelper::drawTextBox(), MSVehicle::enterLaneAtLaneChange(), MSVTypeProbe::execute(), MSVehicle::getAngle(), getCenteringBoundary(), NBNode::getEmptyDir(), GeomHelper::getNormal90D_CW(), GeoConvHelper::getOffsetBase(), GUIDanielPerspectiveChanger::getXPos(), GUIBusStop::GUIBusStop(), GUIJunctionWrapper::GUIJunctionWrapper(), GUILaneWrapper::GUILaneWrapper(), NBEdge::init(), NIXMLEdgesHandler::insertNodeChecking(), GeomHelper::intersection_position2D(), GeomHelper::intersects(), isLeft(), PositionVector::isLeft(), main(), PositionVector::move2side(), MSVehicle::moveChecked(), MSVehicle::moveRegardingCritical(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), GeomHelper::nearest_position_on_line_to_point2D(), GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition(), PositionVector::as_poly_cw_sorter::operator()(), PositionVector::increasing_x_y_sorter::operator()(), TraCIServerAPI_Junction::processGet(), TraCIServerAPI_POI::processGet(), TraCIServerAPI_Vehicle::processGet(), NIImporter_SUMO::reconstructEdgeShape(), Position::reshiftRotate(), NBNodeCont::retrieve(), GUILaneWrapper::ROWdrawAction_drawArrows(), GUILaneWrapper::ROWdrawAction_drawLane2LaneConnections(), GUILaneWrapper::ROWdrawAction_drawLinkNo(), GUILaneWrapper::ROWdrawAction_drawLinkRules(), GUILaneWrapper::ROWdrawAction_drawTLSLinkNo(), Position::set(), GUIVehicle::setFunctionalColor(), NIXMLEdgesHandler::setNodes(), NGNode::setY(), GeomHelper::transfer_to_side(), NILoader::transformCoordinates(), GUISUMOAbstractView::updatePositionInformation(), BinaryFormatter::writeAttr(), NWWriter_OpenDrive::writePlanView(), NWFrame::writePositionLong(), GeoConvHelper::x2cartesian(), GeoConvHelper::x2cartesian_const(), and GUIDanielPerspectiveChanger::zoom().

SUMOReal Position::y ( ) const
inlineinherited

Returns the y-position.

Definition at line 68 of file Position.h.

References Position::myY.

Referenced by Boundary::add(), Line::add(), NIXMLNodesHandler::addNode(), Boundary::around(), PositionVector::around(), Line::atan2Angle(), Line::atan2DegreeAngle(), NIImporter_OpenDrive::calculateStraightEndPoint(), GeoConvHelper::cartesian2geo(), GUIDanielPerspectiveChanger::centerTo(), NGRandomNetBuilder::checkAngles(), TraCIServerAPI_Simulation::commandPositionConversion(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShape(), NGRandomNetBuilder::createNewNode(), GeomHelper::distancePointLine(), GLHelper::drawBoxLine(), GLHelper::drawBoxLines(), GLHelper::drawFilledPoly(), GUITrafficLightLogicWrapper::drawGL(), drawGL(), GUITriggeredRerouter::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIVehicle::drawGL(), GUIBusStop::drawGL(), GUIEdge::drawGL(), GUIVehicle::drawGLAdditional(), GLHelper::drawLine(), GUIE3Collector::MyWrapper::drawSingleCrossing(), GLHelper::drawText(), GLHelper::drawTextBox(), MSVehicle::enterLaneAtLaneChange(), MSVTypeProbe::execute(), MSVehicle::getAngle(), getCenteringBoundary(), NBNode::getEmptyDir(), GeomHelper::getNormal90D_CW(), GeoConvHelper::getOffsetBase(), GUIDanielPerspectiveChanger::getYPos(), GUIBusStop::GUIBusStop(), GUIJunctionWrapper::GUIJunctionWrapper(), GUILaneWrapper::GUILaneWrapper(), NBEdge::init(), NIXMLEdgesHandler::insertNodeChecking(), GeomHelper::intersection_position2D(), GeomHelper::intersects(), isLeft(), PositionVector::isLeft(), main(), PositionVector::move2side(), MSVehicle::moveChecked(), MSVehicle::moveRegardingCritical(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), GeomHelper::nearest_position_on_line_to_point2D(), GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition(), PositionVector::as_poly_cw_sorter::operator()(), PositionVector::increasing_x_y_sorter::operator()(), TraCIServerAPI_Junction::processGet(), TraCIServerAPI_POI::processGet(), TraCIServerAPI_Vehicle::processGet(), NIImporter_SUMO::reconstructEdgeShape(), Position::reshiftRotate(), NBNodeCont::retrieve(), GUILaneWrapper::ROWdrawAction_drawArrows(), GUILaneWrapper::ROWdrawAction_drawLane2LaneConnections(), GUILaneWrapper::ROWdrawAction_drawLinkNo(), GUILaneWrapper::ROWdrawAction_drawLinkRules(), GUILaneWrapper::ROWdrawAction_drawTLSLinkNo(), Position::set(), GUIVehicle::setFunctionalColor(), NIXMLEdgesHandler::setNodes(), NGNode::setX(), GeomHelper::transfer_to_side(), NILoader::transformCoordinates(), GUISUMOAbstractView::updatePositionInformation(), BinaryFormatter::writeAttr(), NWWriter_OpenDrive::writePlanView(), NWFrame::writePositionLong(), GeoConvHelper::x2cartesian(), GeoConvHelper::x2cartesian_const(), and GUIDanielPerspectiveChanger::zoom().

SUMOReal Position::z ( ) const
inlineinherited

Field Documentation

const RGBColor RGBColor::DEFAULT_COLOR = RGBColor::parseColor(RGBColor::DEFAULT_COLOR_STRING)
staticinherited

The default color (for vehicle types and vehicles)

Definition at line 186 of file RGBColor.h.

Referenced by TraCIServerAPI_Simulation::commandDistanceRequest(), SUMOVehicleParserHelper::parseCommonAttributes(), and TraCIServerAPI_Route::processSet().

const std::string RGBColor::DEFAULT_COLOR_STRING = "1,1,0"
staticinherited

The string description of the default color.

Definition at line 182 of file RGBColor.h.

Referenced by RGBColor::getDefaultColor().

int GUIPointOfInterest::myLayer
protected

The layer this object is located in.

This value is used for determining which object to choose as being on top under the cursor

Definition at line 120 of file GUIPointOfInterest.h.

Referenced by getLayer().

std::vector< GUIGlObject_AbstractAdd * > GUIGlObject_AbstractAdd::myObjectList
staticprotectedinherited
std::map< std::string, GUIGlObject_AbstractAdd * > GUIGlObject_AbstractAdd::myObjects
staticprotectedinherited

Map from names of loaded additional objects to the objects themselves.

Definition at line 72 of file GUIGlObject_AbstractAdd.h.

Referenced by GUIGlObject_AbstractAdd::clearDictionary(), GUIGlObject_AbstractAdd::get(), and GUIGlObject_AbstractAdd::GUIGlObject_AbstractAdd().

std::string PointOfInterest::myType
protectedinherited

the type of the poi

Definition at line 84 of file PointOfInterest.h.

Referenced by getPopUpMenu(), PointOfInterest::getType(), and PointOfInterest::setType().

StringBijection< GUIGlObjectType > GUIGlObject::TypeNames
staticinherited

associates object types with strings

Definition at line 99 of file GUIGlObject.h.


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