![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GUIDottedGeometry.h>
Data Structures | |
class | DottedGeometryColor |
class for pack all variables related with GUIDottedGeometry color More... | |
struct | Segment |
dotted geometry segment More... | |
Public Types | |
enum class | DottedContourType { INSPECT , INSPECT_SMALL , REMOVE , SELECT , FRONT , FRONT_SMALL , MOVE , GREEN , MAGENTA , ORANGE , YELLOW , FROMTAZ , TOTAZ , NOTHING } |
Public Member Functions | |
void | drawDottedGeometry (const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, DottedGeometryColor &dottedGeometryColor, const double customWidth=1) const |
draw inspected dottedShape | |
GUIDottedGeometry () | |
constructor | |
GUIDottedGeometry (const GUIVisualizationSettings &s, const GUIDottedGeometry &topDottedGeometry, const bool drawFirstExtrem, const GUIDottedGeometry &botDottedGeometry, const bool drawLastExtrem) | |
constructor for extremes | |
GUIDottedGeometry (const GUIVisualizationSettings &s, PositionVector shape, const bool closeShape) | |
constructor for shapes | |
void | invertOffset () |
invert offset of all segments | |
void | moveShapeToSide (const double value) |
move shape to side | |
void | updateDottedGeometry (const GUIVisualizationSettings &s, const PositionVector &laneShape) |
update GUIDottedGeometry (using lane shape) | |
void | updateDottedGeometry (const GUIVisualizationSettings &s, PositionVector shape, const bool closeShape) |
update GUIDottedGeometry (using shape) | |
Static Public Member Functions | |
draw functions | |
static void | drawDottedContourClosedShape (const GUIVisualizationSettings &s, const DottedContourType type, const PositionVector &shape, const double exaggeration, const double customWidth=1) |
draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs) | |
static void | drawDottedContourShape (const GUIVisualizationSettings &s, const DottedContourType type, const PositionVector &shape, const double width, const double exaggeration, const bool drawFirstExtrem, const bool drawLastExtrem) |
draw dotted contour for the given shape (used by additionals) | |
static void | drawDottedContourCircle (const GUIVisualizationSettings &s, const DottedContourType type, const Position &pos, const double radius, const double exaggeration) |
draw dotted contour for the given Position and radius (used by Juctions and POIs) | |
static void | drawDottedSquaredShape (const GUIVisualizationSettings &s, const DottedContourType type, const Position &pos, const double width, const double height, const double offsetX, const double offsetY, const double rot, const double exaggeration) |
draw dotted squared contour (used by additionals and demand elements) | |
Private Member Functions | |
void | calculateShapeRotationsAndLengths () |
calculate shape rotations and lengths | |
Private Attributes | |
std::vector< GUIDottedGeometry::Segment > | myDottedGeometrySegments |
dotted element shape (note: It's centered in 0,0 due scaling) | |
Definition at line 30 of file GUIDottedGeometry.h.
|
strong |
Enumerator | |
---|---|
INSPECT | |
INSPECT_SMALL | |
REMOVE | |
SELECT | |
FRONT | |
FRONT_SMALL | |
MOVE | |
GREEN | |
MAGENTA | |
ORANGE | |
YELLOW | |
FROMTAZ | |
TOTAZ | |
NOTHING |
Definition at line 34 of file GUIDottedGeometry.h.
GUIDottedGeometry::GUIDottedGeometry | ( | ) |
constructor
Definition at line 154 of file GUIDottedGeometry.cpp.
GUIDottedGeometry::GUIDottedGeometry | ( | const GUIVisualizationSettings & | s, |
PositionVector | shape, | ||
const bool | closeShape | ||
) |
constructor for shapes
Definition at line 157 of file GUIDottedGeometry.cpp.
References calculateShapeRotationsAndLengths(), PositionVector::closePolygon(), GUIVisualizationSettings::dottedContourSettings, PositionVector::length2D(), MAXIMUM_DOTTEDGEOMETRYLENGTH, myDottedGeometrySegments, and GUIVisualizationDottedContourSettings::segmentLength.
GUIDottedGeometry::GUIDottedGeometry | ( | const GUIVisualizationSettings & | s, |
const GUIDottedGeometry & | topDottedGeometry, | ||
const bool | drawFirstExtrem, | ||
const GUIDottedGeometry & | botDottedGeometry, | ||
const bool | drawLastExtrem | ||
) |
constructor for extremes
Definition at line 182 of file GUIDottedGeometry.cpp.
References calculateShapeRotationsAndLengths(), GUIVisualizationSettings::dottedContourSettings, myDottedGeometrySegments, and GUIVisualizationDottedContourSettings::segmentLength.
|
private |
calculate shape rotations and lengths
Definition at line 409 of file GUIDottedGeometry.cpp.
References GUIGeometry::calculateLength(), GUIGeometry::calculateRotation(), and myDottedGeometrySegments.
Referenced by GUIDottedGeometry(), GUIDottedGeometry(), updateDottedGeometry(), and updateDottedGeometry().
|
static |
draw dotted contour for the given Position and radius (used by Juctions and POIs)
Definition at line 374 of file GUIDottedGeometry.cpp.
References drawDottedContourClosedShape(), and GUIGeometry::getVertexCircleAroundPosition().
Referenced by GNEJunction::drawDottedContoursBubble(), GNEAccess::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), and GNEPOI::drawGL().
|
static |
draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs)
Definition at line 311 of file GUIDottedGeometry.cpp.
References GUIVisualizationSettings::drawDottedContour(), drawDottedGeometry(), GLO_DOTTEDCONTOUR_INSPECTED, GLHelper::popMatrix(), GLHelper::pushMatrix(), and PositionVector::scaleRelative().
Referenced by drawDottedContourCircle(), GNETAZ::drawDottedContours(), GNEJunction::drawDottedContoursShape(), drawDottedSquaredShape(), GNEWalkingArea::drawGL(), and GNEPoly::drawGL().
|
static |
draw dotted contour for the given shape (used by additionals)
Definition at line 335 of file GUIDottedGeometry.cpp.
References GUIDottedGeometry::DottedGeometryColor::changeColor(), GUIVisualizationSettings::drawDottedContour(), drawDottedGeometry(), GLO_DOTTEDCONTOUR_INSPECTED, invertOffset(), moveShapeToSide(), GLHelper::popMatrix(), GLHelper::pushMatrix(), and GUIDottedGeometry::DottedGeometryColor::reset().
Referenced by GNEEdge::drawDottedContourEdge(), GNELane::drawDottedContours(), GNEBusStop::drawGL(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNELaneAreaDetector::drawGL(), GNEParkingArea::drawGL(), GNEParkingSpace::drawGL(), GNERouteProbe::drawGL(), GNEVaporizer::drawGL(), GNETAZRelData::drawGL(), GNEConnection::drawGL(), GNECrossing::drawGL(), GNEPoly::drawGL(), GNELane::drawLaneAsRailway(), GNELaneAreaDetector::drawPartialGL(), GNEOverheadWire::drawPartialGL(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), GNELaneAreaDetector::drawPartialGL(), GNEOverheadWire::drawPartialGL(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartial(), GNEDemandElement::drawPersonPlanPartial(), GNEStop::drawStopPersonOverEdge(), GNEStop::drawStopPersonOverStoppingPlace(), and GNEStop::drawVehicleStop().
void GUIDottedGeometry::drawDottedGeometry | ( | const GUIVisualizationSettings & | s, |
GUIDottedGeometry::DottedContourType | type, | ||
DottedGeometryColor & | dottedGeometryColor, | ||
const double | customWidth = 1 |
||
) | const |
draw inspected dottedShape
Definition at line 258 of file GUIDottedGeometry.cpp.
References GUIVisualizationSettings::dottedContourSettings, GLHelper::drawBoxLine(), FROMTAZ, FRONT_SMALL, GUIDottedGeometry::DottedGeometryColor::getColor(), INSPECT_SMALL, myDottedGeometrySegments, REMOVE, GUIVisualizationDottedContourSettings::segmentWidthLarge, GUIVisualizationDottedContourSettings::segmentWidthSmall, SELECT, GLHelper::setColor(), and TOTAZ.
Referenced by drawDottedContourClosedShape(), GNEEdge::drawDottedContourEdge(), drawDottedContourShape(), and GNEEdgeRelData::drawPartialGL().
|
static |
draw dotted squared contour (used by additionals and demand elements)
Definition at line 386 of file GUIDottedGeometry.cpp.
References PositionVector::add(), DEG2RAD, GUIVisualizationSettings::drawDottedContour(), drawDottedContourClosedShape(), and PositionVector::rotate2D().
Referenced by GNECalibrator::drawCalibratorSymbol(), GNEEntryExitDetector::drawGL(), GNEInductionLoopDetector::drawGL(), GNEInstantInductionLoopDetector::drawGL(), GNERerouterSymbol::drawGL(), GNEContainer::drawGL(), GNEPerson::drawGL(), GNEVehicle::drawGL(), GNEPOI::drawGL(), GNEAdditional::drawListedAddtional(), and GNEAdditional::drawSquaredAdditional().
void GUIDottedGeometry::invertOffset | ( | ) |
invert offset of all segments
Definition at line 302 of file GUIDottedGeometry.cpp.
References myDottedGeometrySegments.
Referenced by GNEEdge::drawDottedContourEdge(), drawDottedContourShape(), and GNEEdgeRelData::drawPartialGL().
void GUIDottedGeometry::moveShapeToSide | ( | const double | value | ) |
move shape to side
Definition at line 293 of file GUIDottedGeometry.cpp.
References myDottedGeometrySegments.
Referenced by GNEEdge::drawDottedContourEdge(), drawDottedContourShape(), and GNEEdgeRelData::drawPartialGL().
void GUIDottedGeometry::updateDottedGeometry | ( | const GUIVisualizationSettings & | s, |
const PositionVector & | laneShape | ||
) |
update GUIDottedGeometry (using lane shape)
Definition at line 218 of file GUIDottedGeometry.cpp.
References calculateShapeRotationsAndLengths(), GUIVisualizationSettings::dottedContourSettings, myDottedGeometrySegments, and GUIVisualizationDottedContourSettings::segmentLength.
void GUIDottedGeometry::updateDottedGeometry | ( | const GUIVisualizationSettings & | s, |
PositionVector | shape, | ||
const bool | closeShape | ||
) |
update GUIDottedGeometry (using shape)
Definition at line 235 of file GUIDottedGeometry.cpp.
References calculateShapeRotationsAndLengths(), PositionVector::closePolygon(), GUIVisualizationSettings::dottedContourSettings, myDottedGeometrySegments, and GUIVisualizationDottedContourSettings::segmentLength.
|
private |
dotted element shape (note: It's centered in 0,0 due scaling)
Definition at line 152 of file GUIDottedGeometry.h.
Referenced by calculateShapeRotationsAndLengths(), drawDottedGeometry(), GUIDottedGeometry(), GUIDottedGeometry(), invertOffset(), moveShapeToSide(), updateDottedGeometry(), and updateDottedGeometry().