#include <GUIPolygon2D.h>

Definition at line 44 of file GUIPolygon2D.h.
Public Member Functions | |
| virtual bool | active () const throw () |
| Returns the information whether this object is still active. | |
| void | drawGLName (const Position2D &p, const std::string &id, SUMOReal nameScale) const |
| int | getLayer () const |
| Returns the layer the object is located in. | |
| GUIPolygon2D (GUIGlObjectStorage &idStorage, int layer, const std::string name, const std::string type, const RGBColor &color, const Position2DVector &Pos, bool fill) throw () | |
| Constructor. | |
| ~GUIPolygon2D () throw () | |
| Destructor. | |
inherited from GUIGlObject | |
| void | drawGL (const GUIVisualizationSettings &s) const throw () |
| Draws the object. | |
| Boundary | getCenteringBoundary () const throw () |
| Returns the boundary to which the view shall be centered in order to show the object. | |
| const std::string & | getMicrosimID () const throw () |
| Returns the id of the object as known to microsim. | |
| GUIParameterTableWindow * | getParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent) throw () |
| Returns an own parameter window. | |
| GUIGLObjectPopupMenu * | getPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent) throw () |
| Returns an own popup-menu. | |
Getter | |
| bool | fill () const throw () |
| Returns whether the polygon is filled. | |
| const RGBColor & | getColor () const throw () |
| Returns the color of the polygon. | |
| const std::string & | getID () const throw () |
| Returns the name of the polygon. | |
| const Position2DVector & | getShape () const throw () |
| Returns the shape of the polygon. | |
| const std::string & | getType () const throw () |
| Returns the (abstract) type of the polygon. | |
Atomar getter methods | |
| const std::string & | getFullName () const throw () |
| Returns the full name appearing in the tool tip. | |
| GLuint | getGlID () const throw () |
| Returns the numerical id of the object. | |
inherited from GUIGlObject | |
| GUIGlObjectType | getType () const throw () |
| Returns the type of the object as coded in GUIGlObjectType. | |
Setter | |
| void | setColor (const RGBColor &col) throw () |
| Sets a new color. | |
| void | setFill (bool fill) throw () |
| Sets whether the polygon shall be filled. | |
| void | setShape (const Position2DVector &shape) throw () |
| Sets a new shape. | |
| void | setType (const std::string &type) throw () |
| Sets a new type. | |
Static Public Member Functions | |
| static void | clearDictionary () |
| Clears the dictionary (the objects will not be deleted). | |
| static GUIGlObject_AbstractAdd * | get (const std::string &name) |
| Returns a named object. | |
| static std::vector< GLuint > | getIDList () |
| Returns the list of gl-ids of all additional objects. | |
| static const std::vector < GUIGlObject_AbstractAdd * > & | getObjectList () |
| Returns the list of all additional objects. | |
Protected Member Functions | |
helper methods for building popup-menus | |
| void | buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to center to the object. | |
| void | buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds entries which allow to copy the name / typed name into the clipboard. | |
| void | buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true) throw () |
| Builds the header. | |
| void | buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to copy the cursor position. | |
| void | buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to (de)select the object. | |
| void | buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to open the manipulator window. | |
| void | buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to open the parameter window. | |
Protected Attributes | |
| RGBColor | myColor |
| The color of the polygon. | |
| bool | myFill |
| Information whether the polygon has to be filled. | |
| GUIGlObjectType | myGlType |
| The object's type. | |
| int | myLayer |
| The layer this object is located in. | |
| std::string | myName |
| The name of the polygon. | |
| Position2DVector | myShape |
| The positions of the polygon. | |
| std::string | myType |
| The type of the polygon. | |
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. | |
Friends | |
| class | GUIGlObjectStorage |
| Needed to set the id. | |
| GUIPolygon2D::GUIPolygon2D | ( | GUIGlObjectStorage & | idStorage, | |
| int | layer, | |||
| const std::string | name, | |||
| const std::string | type, | |||
| const RGBColor & | color, | |||
| const Position2DVector & | Pos, | |||
| bool | fill | |||
| ) | throw () |
Constructor.
Definition at line 55 of file GUIPolygon2D.cpp.
00061 : Polygon2D(name, type, color, Pos, fill), 00062 GUIGlObject_AbstractAdd(idStorage, "poly:"+name, GLO_SHAPE), myLayer(layer) {}
| GUIPolygon2D::~GUIPolygon2D | ( | ) | throw () |
| virtual bool GUIGlObject::active | ( | ) | const throw () [inline, virtual, inherited] |
Returns the information whether this object is still active.
Reimplemented in GUIVehicle.
Definition at line 171 of file GUIGlObject.h.
Referenced by GLObjectValuePassConnector< std::pair< int, MSPhaseDefinition > >::updateEachTimestep().
| void GUIGlObject::buildCenterPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to center to the object.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 86 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_RECENTERVIEW, and MID_CENTER.
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUINet::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00087 { 00088 new FXMenuCommand(ret, "Center", GUIIconSubSys::getIcon(ICON_RECENTERVIEW), ret, MID_CENTER); 00089 if (addSeparator) { 00090 new FXMenuSeparator(ret); 00091 } 00092 }
| void GUIGlObject::buildNameCopyPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds entries which allow to copy the name / typed name into the clipboard.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 96 of file GUIGlObject.cpp.
References MID_COPY_NAME, and MID_COPY_TYPED_NAME.
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00097 { 00098 new FXMenuCommand(ret, "Copy name to clipboard", 0, ret, MID_COPY_NAME); 00099 new FXMenuCommand(ret, "Copy typed name to clipboard", 0, ret, MID_COPY_TYPED_NAME); 00100 if (addSeparator) { 00101 new FXMenuSeparator(ret); 00102 } 00103 }
| void GUIGlObject::buildPopupHeader | ( | GUIGLObjectPopupMenu * | ret, | |
| GUIMainWindow & | app, | |||
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds the header.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 75 of file GUIGlObject.cpp.
References GUIGlObject::getFullName().
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUINet::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00077 { 00078 new MFXMenuHeader(ret, app.getBoldFont(), getFullName().c_str(), 0, 0, 0); 00079 if (addSeparator) { 00080 new FXMenuSeparator(ret); 00081 } 00082 }
| void GUIGlObject::buildPositionCopyEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to copy the cursor position.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 131 of file GUIGlObject.cpp.
References MID_COPY_CURSOR_POSITION.
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUINet::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00132 { 00133 new FXMenuCommand(ret, "Copy cursor position to clipboard", 0, ret, MID_COPY_CURSOR_POSITION); 00134 if (addSeparator) { 00135 new FXMenuSeparator(ret); 00136 } 00137 }
| void GUIGlObject::buildSelectionPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to (de)select the object.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 107 of file GUIGlObject.cpp.
References GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObject::getType(), gSelected, ICON_FLAG_MINUS, ICON_FLAG_PLUS, GUISelectedStorage::isSelected(), MID_ADDSELECT, and MID_REMOVESELECT.
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00108 { 00109 if (gSelected.isSelected(getType(), getGlID())) { 00110 new FXMenuCommand(ret, "Remove From Selected", GUIIconSubSys::getIcon(ICON_FLAG_MINUS), ret, MID_REMOVESELECT); 00111 } else { 00112 new FXMenuCommand(ret, "Add To Selected", GUIIconSubSys::getIcon(ICON_FLAG_PLUS), ret, MID_ADDSELECT); 00113 } 00114 if (addSeparator) { 00115 new FXMenuSeparator(ret); 00116 } 00117 }
| void GUIGlObject::buildShowManipulatorPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to open the manipulator window.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 141 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.
Referenced by GUITriggeredRerouter::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), and GUIEmitter::getPopUpMenu().
00142 { 00143 new FXMenuCommand(ret, "Open Manipulator...", 00144 GUIIconSubSys::getIcon(ICON_MANIP), ret, MID_MANIP); 00145 if (addSeparator) { 00146 new FXMenuSeparator(ret); 00147 } 00148 }
| void GUIGlObject::buildShowParamsPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to open the parameter window.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 121 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWPARS.
Referenced by GUIVehicle::getPopUpMenu(), GUINet::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIEdge::getPopUpMenu(), and GUIDetectorWrapper::getPopUpMenu().
00122 { 00123 new FXMenuCommand(ret, "Show Parameter", GUIIconSubSys::getIcon(ICON_APP_TABLE), ret, MID_SHOWPARS); 00124 if (addSeparator) { 00125 new FXMenuSeparator(ret); 00126 } 00127 }
| void GUIGlObject_AbstractAdd::clearDictionary | ( | ) | [static, inherited] |
Clears the dictionary (the objects will not be deleted).
!! delete (*i).second;
Definition at line 82 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myObjectList, and GUIGlObject_AbstractAdd::myObjects.
Referenced by GUINet::~GUINet().
00082 { 00083 std::map<std::string, GUIGlObject_AbstractAdd*>::iterator i; 00084 for (i=myObjects.begin(); i!=myObjects.end(); i++) { 00086 } 00087 myObjects.clear(); 00088 myObjectList.clear(); 00089 }
| void GUIPolygon2D::drawGL | ( | const GUIVisualizationSettings & | s | ) | const throw () [virtual] |
Draws the object.
| [in] | s | The settings for the current view (may influence drawing) |
Implements GUIGlObject.
Definition at line 145 of file GUIPolygon2D.cpp.
References APIENTRY, beginCallback(), RGBColor::blue(), combineCallback(), GLHelper::drawBoxLines(), GLHelper::drawLine(), endCallback(), Polygon2D::fill(), Polygon2D::getColor(), GUIGlObject::getGlID(), getLayer(), RGBColor::green(), Polygon2D::myShape, RGBColor::red(), Position2DVector::size(), and SUMOReal.
00145 { 00146 if (fill()) { 00147 if (myShape.size()<3) { 00148 return; 00149 } 00150 } else { 00151 if (myShape.size()<2) { 00152 return; 00153 } 00154 } 00155 glPushMatrix(); 00156 if (getLayer()==0) { 00157 glTranslated(0, 0, -.03); 00158 } else if (getLayer()>0) { 00159 glTranslated(0, 0, -.05-.01*(SUMOReal) getLayer()); 00160 } else { 00161 glTranslated(0, 0, -.01*(SUMOReal) getLayer()+.01); 00162 } 00163 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 00164 // (optional) set id 00165 if (s.needsGlID) { 00166 glPushName(getGlID()); 00167 } 00168 RGBColor color = getColor(); 00169 glColor3d(color.red(), color.green(), color.blue()); 00170 if (fill()) { 00171 double *points = new double[myShape.size()*3]; 00172 GLUtesselator *tobj = gluNewTess(); 00173 gluTessCallback(tobj, GLU_TESS_VERTEX, (GLvoid(APIENTRY*)()) &glVertex3dv); 00174 gluTessCallback(tobj, GLU_TESS_BEGIN, (GLvoid(APIENTRY*)()) &beginCallback); 00175 gluTessCallback(tobj, GLU_TESS_END, (GLvoid(APIENTRY*)()) &endCallback); 00176 //gluTessCallback(tobj, GLU_TESS_ERROR, (GLvoid (APIENTRY*) ()) &errorCallback); 00177 gluTessCallback(tobj, GLU_TESS_COMBINE, (GLvoid(APIENTRY*)()) &combineCallback); 00178 gluTessProperty(tobj, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_ODD); 00179 gluTessBeginPolygon(tobj, NULL); 00180 gluTessBeginContour(tobj); 00181 for (size_t i=0; i!=myShape.size(); ++i) { 00182 points[3*i] = myShape[(int) i].x(); 00183 points[3*i+1] = myShape[(int) i].y(); 00184 points[3*i+2] = 0; 00185 glvert[0] = myShape[(int) i].x(); 00186 glvert[1] = myShape[(int) i].y(); 00187 glvert[2] = 0; 00188 glvert[3] = 1; 00189 glvert[4] = 1; 00190 glvert[5] = 1; 00191 gluTessVertex(tobj, points+3*i, points+3*i) ; 00192 } 00193 gluTessEndContour(tobj); 00194 00195 gluTessEndPolygon(tobj); 00196 gluDeleteTess(tobj); 00197 delete[] points; 00198 } else { 00199 GLHelper::drawLine(myShape); 00200 GLHelper::drawBoxLines(myShape, 1.); 00201 } 00202 // (optional) clear id 00203 if (s.needsGlID) { 00204 glPopName(); 00205 } 00206 glPopMatrix(); 00207 }
| void GUIGlObject_AbstractAdd::drawGLName | ( | const Position2D & | p, | |
| const std::string & | id, | |||
| SUMOReal | nameScale | |||
| ) | const [inherited] |
Definition at line 120 of file GUIGlObject_AbstractAdd.cpp.
References pfdkGetStringWidth(), pfDrawString(), pfSetPosition(), pfSetScale(), SUMOReal, Position2D::x(), and Position2D::y().
Referenced by GUILaneSpeedTrigger::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUIEmitter::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIBusStop::drawGL(), and GUI_E2_ZS_Collector::MyWrapper::drawGL().
00120 { 00121 glPolygonOffset(0, -6); 00122 glPushMatrix(); 00123 glTranslated(p.x(), p.y(), 0); 00124 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 00125 pfSetPosition(0, 0); 00126 pfSetScale(nameScale); 00127 SUMOReal w = pfdkGetStringWidth(id.c_str()); 00128 glRotated(180, 1, 0, 0); 00129 glTranslated(-w/2., 0.4, 0); 00130 pfDrawString(id.c_str()); 00131 glPopMatrix(); 00132 }
| bool Polygon2D::fill | ( | ) | const throw () [inline, inherited] |
Returns whether the polygon is filled.
Definition at line 103 of file Polygon2D.h.
References Polygon2D::myFill.
Referenced by drawGL(), and TraCIServerAPI_Polygon::processGet().
00103 { 00104 return myFill; 00105 }
| GUIGlObject_AbstractAdd * GUIGlObject_AbstractAdd::get | ( | const std::string & | name | ) | [static, inherited] |
Returns a named object.
Definition at line 93 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myObjects.
00093 { 00094 std::map<std::string, GUIGlObject_AbstractAdd*>::iterator i = 00095 myObjects.find(name); 00096 if (i==myObjects.end()) { 00097 return 0; 00098 } 00099 return (*i).second; 00100 }
| Boundary GUIPolygon2D::getCenteringBoundary | ( | ) | const throw () [virtual] |
Returns the boundary to which the view shall be centered in order to show the object.
Implements GUIGlObject.
Definition at line 99 of file GUIPolygon2D.cpp.
References Boundary::add(), Position2DVector::getBoxBoundary(), Boundary::grow(), and Polygon2D::myShape.
00099 { 00100 Boundary b; 00101 b.add(myShape.getBoxBoundary()); 00102 b.grow(10); 00103 return b; 00104 }
| const RGBColor& Polygon2D::getColor | ( | ) | const throw () [inline, inherited] |
Returns the color of the polygon.
Definition at line 87 of file Polygon2D.h.
References Polygon2D::myColor.
Referenced by drawGL(), and TraCIServerAPI_Polygon::processGet().
00087 { 00088 return myColor; 00089 }
| const std::string& GUIGlObject::getFullName | ( | ) | const throw () [inline, inherited] |
Returns the full name appearing in the tool tip.
Definition at line 95 of file GUIGlObject.h.
References GUIGlObject::myFullName.
Referenced by GUIGlObject::buildPopupHeader(), GUIGLObjectPopupMenu::onCmdCopyTypedName(), GUIParam_PopupMenuInterface::onCmdOpenTracker(), GUIGLObjectToolTip::onPaint(), GUITriggeredRerouter::openManipulator(), GUILaneSpeedTrigger::openManipulator(), GUIEmitter::openManipulator(), GUIDialog_GLChosenEditor::rebuildList(), GUISelectedStorage::save(), and GUISelectedStorage::SingleTypeSelections::save().
00095 { 00096 return myFullName; 00097 }
| GLuint GUIGlObject::getGlID | ( | ) | const throw () [inline, inherited] |
Returns the numerical id of the object.
Definition at line 103 of file GUIGlObject.h.
References GUIGlObject::myGlID.
Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIViewTraffic::drawBestLanes(), GUIVehicle::drawGL(), GUITriggeredRerouter::drawGL(), drawGL(), GUIPointOfInterest::drawGL(), GUILaneWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIJunctionWrapper::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUIEmitter::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIBusStop::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIViewTraffic::drawRoute(), FXIMPLEMENT(), GUILaneWrapper::Colorer::getColorValue(), GUISUMOAbstractView::getObjectUnderCursor(), GUIVehicle::getPopUpMenu(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GUIVehicle::GUIVehiclePopupMenu::onCmdStartTrack(), and ROWdrawAction_drawLinkRules().
00103 { 00104 return myGlID; 00105 }
| const std::string& Polygon2D::getID | ( | ) | const throw () [inline, inherited] |
Returns the name of the polygon.
Definition at line 71 of file Polygon2D.h.
References Polygon2D::myName.
Referenced by traci::TraCIServer::handlePolygonDomain().
00071 { 00072 return myName; 00073 }
| std::vector< GLuint > GUIGlObject_AbstractAdd::getIDList | ( | ) | [static, inherited] |
Returns the list of gl-ids of all additional objects.
Definition at line 110 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myObjectList.
Referenced by FXIMPLEMENT().
00110 { 00111 std::vector<GLuint> ret; 00112 for (std::vector<GUIGlObject_AbstractAdd*>::iterator i=myObjectList.begin(); i!=myObjectList.end(); ++i) { 00113 ret.push_back((*i)->getGlID()); 00114 } 00115 return ret; 00116 }
| int GUIPolygon2D::getLayer | ( | ) | const |
Returns the layer the object is located in.
Definition at line 212 of file GUIPolygon2D.cpp.
References myLayer.
Referenced by drawGL().
00212 { 00213 return myLayer; 00214 }
| const std::string & GUIPolygon2D::getMicrosimID | ( | ) | const throw () [virtual] |
Returns the id of the object as known to microsim.
Implements GUIGlObject.
Definition at line 93 of file GUIPolygon2D.cpp.
References Polygon2D::myName.
00093 { 00094 return myName; 00095 }
| const std::vector< GUIGlObject_AbstractAdd * > & GUIGlObject_AbstractAdd::getObjectList | ( | ) | [static, inherited] |
Returns the list of all additional objects.
Definition at line 104 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myObjectList.
Referenced by GUINet::initGUIStructures().
00104 { 00105 return myObjectList; 00106 }
| GUIParameterTableWindow * GUIPolygon2D::getParameterWindow | ( | GUIMainWindow & | app, | |
| GUISUMOAbstractView & | parent | |||
| ) | throw () [virtual] |
Returns an own parameter window.
| [in] | app | The application needed to build the parameter window |
| [in] | parent | The parent window needed to build the parameter window |
Implements GUIGlObject.
Definition at line 86 of file GUIPolygon2D.cpp.
| GUIGLObjectPopupMenu * GUIPolygon2D::getPopUpMenu | ( | GUIMainWindow & | app, | |
| GUISUMOAbstractView & | parent | |||
| ) | throw () [virtual] |
Returns an own popup-menu.
| [in] | app | The application needed to build the popup-menu |
| [in] | parent | The parent window needed to build the popup-menu |
Implements GUIGlObject.
Definition at line 70 of file GUIPolygon2D.cpp.
References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildNameCopyPopupEntry(), GUIGlObject::buildPopupHeader(), GUIGlObject::buildPositionCopyEntry(), GUIGlObject::buildSelectionPopupEntry(), and Polygon2D::myType.
00071 { 00072 GUIGLObjectPopupMenu *ret = new GUIGLObjectPopupMenu(app, parent, *this); 00073 buildPopupHeader(ret, app, false); 00074 FXString t(myType.c_str()); 00075 new FXMenuCommand(ret, "(" + t + ")", 0, 0, 0); 00076 new FXMenuSeparator(ret); 00077 buildCenterPopupEntry(ret); 00078 buildNameCopyPopupEntry(ret); 00079 buildSelectionPopupEntry(ret); 00080 buildPositionCopyEntry(ret, false); 00081 return ret; 00082 }
| const Position2DVector& Polygon2D::getShape | ( | ) | const throw () [inline, inherited] |
Returns the shape of the polygon.
Definition at line 95 of file Polygon2D.h.
References Polygon2D::myShape.
Referenced by traci::TraCIServer::handlePolygonDomain(), and TraCIServerAPI_Polygon::processGet().
00095 { 00096 return myShape; 00097 }
| GUIGlObjectType GUIGlObject_AbstractAdd::getType | ( | ) | const throw () [virtual, inherited] |
Returns the type of the object as coded in GUIGlObjectType.
Implements GUIGlObject.
Reimplemented in GUIDetectorWrapper.
Definition at line 76 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myGlType.
00076 { 00077 return myGlType; 00078 }
| const std::string& Polygon2D::getType | ( | ) | const throw () [inline, inherited] |
Returns the (abstract) type of the polygon.
Definition at line 79 of file Polygon2D.h.
References Polygon2D::myType.
Referenced by traci::TraCIServer::handlePolygonDomain(), and TraCIServerAPI_Polygon::processGet().
00079 { 00080 return myType; 00081 }
| void Polygon2D::setColor | ( | const RGBColor & | col | ) | throw () [inline, inherited] |
Sets a new color.
| [in] | col | The new color to use |
Definition at line 124 of file Polygon2D.h.
References Polygon2D::myColor.
Referenced by TraCIServerAPI_Polygon::processSet().
00124 { 00125 myColor = col; 00126 }
| void Polygon2D::setFill | ( | bool | fill | ) | throw () [inline, inherited] |
Sets whether the polygon shall be filled.
| [in] | fill | Whether the polygon shall be filled |
Definition at line 140 of file Polygon2D.h.
References Polygon2D::myFill.
Referenced by TraCIServerAPI_Polygon::processSet().
00140 { 00141 myFill = fill; 00142 }
| void Polygon2D::setShape | ( | const Position2DVector & | shape | ) | throw () [inline, inherited] |
Sets a new shape.
| [in] | shape | The new shape to use |
Definition at line 132 of file Polygon2D.h.
References Polygon2D::myShape.
Referenced by TraCIServerAPI_Polygon::processSet().
00132 { 00133 myShape = shape; 00134 }
| void Polygon2D::setType | ( | const std::string & | type | ) | throw () [inline, inherited] |
Sets a new type.
| [in] | type | The new type to use |
Definition at line 116 of file Polygon2D.h.
References Polygon2D::myType.
Referenced by TraCIServerAPI_Polygon::processSet().
00116 { 00117 myType = type; 00118 }
friend class GUIGlObjectStorage [friend, inherited] |
Needed to set the id.
Reimplemented in GUI_E2_ZS_CollectorOverLanes::MyWrapper.
Definition at line 111 of file GUIGlObject.h.
RGBColor Polygon2D::myColor [protected, inherited] |
The color of the polygon.
Definition at line 154 of file Polygon2D.h.
Referenced by Polygon2D::getColor(), and Polygon2D::setColor().
bool Polygon2D::myFill [protected, inherited] |
Information whether the polygon has to be filled.
Definition at line 160 of file Polygon2D.h.
Referenced by Polygon2D::fill(), and Polygon2D::setFill().
GUIGlObjectType GUIGlObject_AbstractAdd::myGlType [protected, inherited] |
The object's type.
Definition at line 85 of file GUIGlObject_AbstractAdd.h.
Referenced by GUIGlObject_AbstractAdd::getType().
int GUIPolygon2D::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 115 of file GUIPolygon2D.h.
Referenced by getLayer().
std::string Polygon2D::myName [protected, inherited] |
The name of the polygon.
Definition at line 148 of file Polygon2D.h.
Referenced by Polygon2D::getID(), and getMicrosimID().
std::vector< GUIGlObject_AbstractAdd * > GUIGlObject_AbstractAdd::myObjectList [static, protected, inherited] |
The list of all addtional objects currently loaded.
Definition at line 92 of file GUIGlObject_AbstractAdd.h.
Referenced by GUIGlObject_AbstractAdd::clearDictionary(), GUIGlObject_AbstractAdd::getIDList(), and GUIGlObject_AbstractAdd::getObjectList().
std::map< std::string, GUIGlObject_AbstractAdd * > GUIGlObject_AbstractAdd::myObjects [static, protected, inherited] |
Map from names of loaded additional objects to the objects themselves.
Definition at line 89 of file GUIGlObject_AbstractAdd.h.
Referenced by GUIGlObject_AbstractAdd::clearDictionary(), and GUIGlObject_AbstractAdd::get().
Position2DVector Polygon2D::myShape [protected, inherited] |
The positions of the polygon.
Definition at line 157 of file Polygon2D.h.
Referenced by drawGL(), getCenteringBoundary(), Polygon2D::getShape(), and Polygon2D::setShape().
std::string Polygon2D::myType [protected, inherited] |
The type of the polygon.
Definition at line 151 of file Polygon2D.h.
Referenced by getPopUpMenu(), Polygon2D::getType(), and Polygon2D::setType().
1.5.6