![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEGeometry.h>
Data Structures | |
| class | DottedGeometry |
| class for pack all variables related with DottedGeometry More... | |
| class | DottedGeometryColor |
| class for pack all variables related with DottedGeometry color More... | |
| class | Geometry |
| class for NETEDIT geometries over lanes More... | |
| class | Lane2laneConnection |
| class lane2lane connection geometry More... | |
Public Types | |
| enum | DottedContourType { DottedContourType::INSPECT, DottedContourType::FRONT, DottedContourType::MOVE, DottedContourType::GREEN, DottedContourType::MAGENTA } |
Static Public Member Functions | |
| static void | adjustStartPosGeometricPath (double &startPos, const GNELane *startLane, double &endPos, const GNELane *endLane) |
| adjust start and end positions in geometric path More... | |
| static double | calculateLength (const Position &first, const Position &second) |
| return length between two points (used in geometric calculations) More... | |
| static double | calculateRotation (const Position &first, const Position &second) |
| return angle between two points (used in geometric calculations) More... | |
| static void | drawChildLine (const GUIVisualizationSettings &s, const Position &child, const Position &parent, const RGBColor &color, const bool drawEntire) |
| draw line between child and parent (used in NETEDIT) More... | |
| static void | drawContourGeometry (const Geometry &geometry, const double width, const bool drawExtremes=false) |
| draw contour geometry More... | |
| static void | drawDottedContourCircle (const DottedContourType type, const GUIVisualizationSettings &s, const Position &pos, const double radius, const double exaggeration) |
| draw dotted contour for the given Position and radius (used by Juctions and POIs) More... | |
| static void | drawDottedContourClosedShape (const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double exaggeration, const double lineWidth=-1) |
| draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs) More... | |
| static void | drawDottedContourEdge (const DottedContourType type, const GUIVisualizationSettings &s, const GNEEdge *edge, const bool drawFrontExtreme, const bool drawBackExtreme) |
| draw dotted contour for the given dottedGeometries (used by edges) More... | |
| static void | drawDottedContourShape (const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double width, const double exaggeration, const bool drawFirstExtrem, const bool drawLastExtrem, const double lineWidth=-1) |
| draw dotted contour for the given shape (used by additionals) More... | |
| static void | drawDottedSquaredShape (const DottedContourType type, const GUIVisualizationSettings &s, 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) More... | |
| static void | drawGeometry (const GNEViewNet *viewNet, const Geometry &geometry, const double width) |
| draw geometry More... | |
| static void | drawGeometryPoints (const GUIVisualizationSettings &s, const GNEViewNet *viewNet, const PositionVector &shape, const RGBColor &geometryPointColor, const RGBColor &textColor, const double radius, const double exaggeration) |
| draw geometry points More... | |
| static void | drawLaneGeometry (const GNEViewNet *viewNet, const PositionVector &shape, const std::vector< double > &rotations, const std::vector< double > &lengths, const std::vector< RGBColor > &colors, double width, const bool onlyContour=false) |
| draw lane geometry (use their own function due colors) More... | |
| static void | drawMovingHint (const GUIVisualizationSettings &s, const GNEViewNet *viewNet, const PositionVector &shape, const RGBColor &hintColor, const double radius, const double exaggeration) |
| draw moving hint More... | |
| static void | drawParentLine (const GUIVisualizationSettings &s, const Position &parent, const Position &child, const RGBColor &color, const bool drawEntire) |
| draw line between parent and children (used in NETEDIT) More... | |
| static PositionVector | getVertexCircleAroundPosition (const Position &pos, const double width, const int steps=8) |
| get a circle around the given position More... | |
| static void | rotateOverLane (const double rot) |
| rotate over lane (used by Lock icons, detector logos, etc.) More... | |
Static Private Member Functions | |
| static int | angleLookup (const double angleDeg) |
| normalize angle for lookup in myCircleCoords More... | |
Static Private Attributes | |
| static PositionVector | myCircleCoords |
| Storage for precomputed sin/cos-values describing a circle. More... | |
Definition at line 53 of file GNEGeometry.h.
|
strong |
| Enumerator | |
|---|---|
| INSPECT | |
| FRONT | |
| MOVE | |
| GREEN | |
| MAGENTA | |
Definition at line 116 of file GNEGeometry.h.
|
static |
adjust start and end positions in geometric path
Definition at line 581 of file GNEGeometry.cpp.
References GNELane::getLaneShape(), PositionVector::length(), and POSITION_EPS.
|
staticprivate |
normalize angle for lookup in myCircleCoords
Definition at line 1117 of file GNEGeometry.cpp.
References CIRCLE_RESOLUTION, and myCircleCoords.
Referenced by getVertexCircleAroundPosition().
return length between two points (used in geometric calculations)
Definition at line 574 of file GNEGeometry.cpp.
References Position::distanceTo2D().
Referenced by GNEGeometry::Geometry::calculateShapeRotationsAndLengths(), GNEGeometry::DottedGeometry::calculateShapeRotationsAndLengths(), and GNEViewNet::drawLaneCandidates().
return angle between two points (used in geometric calculations)
Definition at line 567 of file GNEGeometry.cpp.
References M_PI, Position::x(), and Position::y().
Referenced by GNEGeometry::Geometry::calculateShapeRotationsAndLengths(), GNEGeometry::DottedGeometry::calculateShapeRotationsAndLengths(), GNELane::drawArrows(), and GNEViewNet::drawLaneCandidates().
|
static |
draw line between child and parent (used in NETEDIT)
Definition at line 1025 of file GNEGeometry.cpp.
References GUIVisualizationSettings::additionalSettings, Position::angleTo2D(), GUIVisualizationAdditionalSettings::arrowLength, GUIVisualizationAdditionalSettings::arrowOffset, GUIVisualizationAdditionalSettings::arrowWidth, RGBColor::changedBrightness(), Position::distanceSquaredTo2D(), GLHelper::drawBoxLine(), GUIVisualizationSettings::drawForPositionSelection, GUIVisualizationSettings::drawForRectangleSelection, GLHelper::drawTriangleAtEnd(), GLHelper::popMatrix(), PositionVector::positionAtOffset2D(), GLHelper::pushMatrix(), RAD2DEG, and GLHelper::setColor().
Referenced by GNEAdditional::drawParentChildLines(), and GNEDemandElement::drawPersonPlanPartial().
|
static |
draw contour geometry
Definition at line 638 of file GNEGeometry.cpp.
References PositionVector::append(), PositionVector::closePolygon(), GLHelper::drawBoxLines(), GNEGeometry::Geometry::getShape(), PositionVector::move2side(), and PositionVector::reverse().
Referenced by GNEEdgeRelData::drawPartialGL(), and GNEAdditional::drawPartialGL().
|
static |
draw dotted contour for the given Position and radius (used by Juctions and POIs)
Definition at line 934 of file GNEGeometry.cpp.
References drawDottedContourClosedShape(), and getVertexCircleAroundPosition().
Referenced by GNEVariableSpeedSignSymbol::drawGL(), GNEAccess::drawGL(), GNEJunction::drawGL(), and GNEPOI::drawGL().
|
static |
draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs)
Definition at line 861 of file GNEGeometry.cpp.
References GNEGeometry::DottedGeometry::drawDottedGeometry(), FRONT, GLO_DOTTEDCONTOUR_INSPECTED, GLHelper::popMatrix(), GLHelper::pushMatrix(), and PositionVector::scaleRelative().
Referenced by drawDottedContourCircle(), GNETAZ::drawDottedContours(), drawDottedSquaredShape(), GNEJunction::drawGL(), and GNEPoly::drawGL().
|
static |
draw dotted contour for the given dottedGeometries (used by edges)
Definition at line 809 of file GNEGeometry.cpp.
References GNEGeometry::DottedGeometryColor::changeColor(), drawDottedContourShape(), GNEGeometry::DottedGeometry::drawDottedGeometry(), FRONT, OptionsCont::getBool(), GNEEdge::getLanes(), GNELane::getLaneShape(), OptionsCont::getOptions(), GLO_DOTTEDCONTOUR_FRONT, GLO_DOTTEDCONTOUR_INSPECTED, GNELane::LaneDrawingConstants::halfWidth, GNEGeometry::DottedGeometry::invertOffset(), GNEGeometry::DottedGeometry::moveShapeToSide(), GLHelper::popMatrix(), GLHelper::pushMatrix(), and GNEGeometry::DottedGeometryColor::reset().
Referenced by GNEEdge::drawGL(), GNEEdgeData::drawPartialGL(), and GNEEdgeRelData::drawPartialGL().
|
static |
draw dotted contour for the given shape (used by additionals)
Definition at line 891 of file GNEGeometry.cpp.
References GNEGeometry::DottedGeometryColor::changeColor(), GNEGeometry::DottedGeometry::drawDottedGeometry(), FRONT, GLO_DOTTEDCONTOUR_FRONT, GLO_DOTTEDCONTOUR_INSPECTED, GNEGeometry::DottedGeometry::invertOffset(), GNEGeometry::DottedGeometry::moveShapeToSide(), GLHelper::popMatrix(), GLHelper::pushMatrix(), and GNEGeometry::DottedGeometryColor::reset().
Referenced by drawDottedContourEdge(), GNETAZ::drawDottedContours(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEParkingArea::drawGL(), GNEVaporizer::drawGL(), GNERouteProbe::drawGL(), GNETAZRelData::drawGL(), GNEDetectorE2::drawGL(), GNECrossing::drawGL(), GNEStopContainer::drawGL(), GNEStopPerson::drawGL(), GNEConnection::drawGL(), GNEPoly::drawGL(), GNELane::drawGL(), GNELane::drawLaneAsRailway(), GNERoute::drawPartialGL(), GNEAdditional::drawPartialGL(), GNEVehicle::drawPartialGL(), and GNEDemandElement::drawPersonPlanPartial().
|
static |
draw dotted squared contour (used by additionals and demand elements)
Definition at line 945 of file GNEGeometry.cpp.
References PositionVector::add(), DEG2RAD, drawDottedContourClosedShape(), and PositionVector::rotate2D().
Referenced by GNECalibrator::drawCalibratorSymbol(), GNEDetectorE1::drawGL(), GNERerouterSymbol::drawGL(), GNEDetectorE1Instant::drawGL(), GNEParkingSpace::drawGL(), GNEPOI::drawGL(), GNEContainer::drawGL(), GNEPerson::drawGL(), GNEVehicle::drawGL(), and GNEAdditional::drawSquaredAdditional().
|
static |
draw geometry
Definition at line 610 of file GNEGeometry.cpp.
References Position::distanceSquaredTo2D(), GLHelper::drawBoxLines(), GLHelper::drawFilledCircle(), GUIVisualizationSettings::drawForPositionSelection, GLHelper::drawLine(), GUIVisualizationSettings::getCircleResolution(), GUISUMOAbstractView::getPositionInformation(), GNEGeometry::Geometry::getShape(), GNEGeometry::Geometry::getShapeLengths(), GNEGeometry::Geometry::getShapeRotations(), GUISUMOAbstractView::getVisualisationSettings(), PositionVector::nearest_offset_to_point2D(), GLHelper::popMatrix(), PositionVector::positionAtOffset2D(), GLHelper::pushMatrix(), GUIVisualizationSettings::scale, Position::x(), and Position::y().
Referenced by GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEParkingArea::drawGL(), GNEVaporizer::drawGL(), GNERouteProbe::drawGL(), GNETAZRelData::drawGL(), GNEDetectorE2::drawGL(), GNEInternalLane::drawGL(), GNEJunction::drawGL(), GNEStop::drawGL(), GNETAZ::drawGL(), GNEPoly::drawGL(), GNELane::drawMarkings(), GNERoute::drawPartialGL(), GNEAdditional::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartial(), GNEStopContainer::drawStopContainerOverLane(), GNEStopContainer::drawStopContainerOverStopContainer(), GNEStopPerson::drawStopPersonOverBusStop(), GNEStopPerson::drawStopPersonOverLane(), and GNEViewNet::drawTemporalJunction().
|
static |
draw geometry points
Definition at line 665 of file GNEGeometry.cpp.
References GUIVisualizationSettings::detailSettings, Position::distanceSquaredTo2D(), GUIVisualizationSettings::drawDetail(), GLHelper::drawFilledCircle(), GUIVisualizationSettings::drawForPositionSelection, GUIVisualizationSettings::drawForRectangleSelection, GLHelper::drawText(), GNEViewNetHelper::NetworkViewOptions::editingElevation(), GUIVisualizationDetailSettings::geometryPointsText, GUIVisualizationSettings::getCircleResolution(), GNEViewNet::getNetworkViewOptions(), GUISUMOAbstractView::getPositionInformation(), GLHelper::popMatrix(), GLHelper::pushMatrix(), GLHelper::setColor(), and toString().
Referenced by GNECrossing::drawGL(), GNEJunction::drawGL(), GNETAZ::drawGL(), GNEConnection::drawGL(), GNEPoly::drawGL(), and GNEAdditionalFrame::E2MultilaneLaneSelector::drawTemporalE2Multilane().
|
static |
draw lane geometry (use their own function due colors)
Definition at line 764 of file GNEGeometry.cpp.
References PositionVector::append(), PositionVector::closePolygon(), Position::distanceSquaredTo2D(), GLHelper::drawBoxLines(), GLHelper::drawFilledCircle(), GUIVisualizationSettings::drawForPositionSelection, GUIVisualizationSettings::getCircleResolution(), GUISUMOAbstractView::getPositionInformation(), GUISUMOAbstractView::getVisualisationSettings(), PositionVector::move2side(), PositionVector::nearest_offset_to_point2D(), GLHelper::popMatrix(), PositionVector::positionAtOffset2D(), GLHelper::pushMatrix(), PositionVector::reverse(), Position::x(), and Position::y().
Referenced by GNELane::drawGL(), GNELane::drawLaneAsRailway(), GNEEdgeData::drawPartialGL(), and GNEEdgeRelData::drawPartialGL().
|
static |
draw moving hint
Definition at line 721 of file GNEGeometry.cpp.
References PositionVector::distance2D(), GLHelper::drawFilledCircle(), GUIVisualizationSettings::getCircleResolution(), GNEViewNet::getEditModes(), GUISUMOAbstractView::getPositionInformation(), PositionVector::nearest_offset_to_point2D(), NETWORK_MOVE, GNEViewNetHelper::EditModes::networkEditMode, GLHelper::popMatrix(), PositionVector::positionAtOffset2D(), GLHelper::pushMatrix(), GLHelper::setColor(), Position::x(), and Position::y().
Referenced by GNECrossing::drawGL(), GNEJunction::drawGL(), GNETAZ::drawGL(), GNEConnection::drawGL(), and GNEPoly::drawGL().
|
static |
draw line between parent and children (used in NETEDIT)
Definition at line 966 of file GNEGeometry.cpp.
References GUIVisualizationSettings::additionalSettings, Position::angleTo2D(), GUIVisualizationAdditionalSettings::arrowLength, GUIVisualizationAdditionalSettings::arrowOffset, GUIVisualizationAdditionalSettings::arrowWidth, RGBColor::changedBrightness(), Position::distanceSquaredTo2D(), GLHelper::drawBoxLine(), GUIVisualizationSettings::drawForPositionSelection, GUIVisualizationSettings::drawForRectangleSelection, GLHelper::drawTriangleAtEnd(), GLHelper::popMatrix(), PositionVector::positionAtOffset2D(), GLHelper::pushMatrix(), RAD2DEG, and GLHelper::setColor().
Referenced by GNEAdditional::drawParentChildLines().
|
static |
get a circle around the given position
Definition at line 1087 of file GNEGeometry.cpp.
References PositionVector::add(), angleLookup(), CIRCLE_RESOLUTION, DEG2RAD, myCircleCoords, Position::x(), and Position::y().
Referenced by drawDottedContourCircle().
|
static |
rotate over lane (used by Lock icons, detector logos, etc.)
Definition at line 1110 of file GNEGeometry.cpp.
Referenced by GNECalibrator::drawCalibratorSymbol(), GNEDetector::drawDetectorLogo(), GNEDetector::drawE1Shape(), GNEDetectorEntryExit::drawGL(), GNERerouterSymbol::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), GNEVaporizer::drawGL(), GNERouteProbe::drawGL(), GNEStoppingPlace::drawLines(), GNEAdditional::drawPartialGL(), GNEStoppingPlace::drawSign(), GNEStopContainer::drawStopContainerOverLane(), GNEStopContainer::drawStopContainerOverStopContainer(), GNEStopPerson::drawStopPersonOverBusStop(), and GNEStopPerson::drawStopPersonOverLane().
|
staticprivate |
Storage for precomputed sin/cos-values describing a circle.
Definition at line 316 of file GNEGeometry.h.
Referenced by angleLookup(), and getVertexCircleAroundPosition().