![]() |
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... | |
struct | ExtremeGeometry |
struct for variables used in Geometry extremes More... | |
class | Geometry |
class for NETEDIT geometries over lanes More... | |
class | HierarchicalConnections |
class to pack all variables and functions relative to connections between hierarchical element and their children More... | |
class | Lane2laneConnection |
class lane2lane connection geometry More... | |
struct | SegmentGeometry |
struct for pack all variables related with geometry of elemements divided in segments More... | |
Public Types | |
enum class | DottedContourType { INSPECT , FRONT , MOVE } |
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 void | calculateLaneGeometricPath (GNEGeometry::SegmentGeometry &segmentGeometry, const std::vector< GNEPathElements::PathElement > &path, GNEGeometry::ExtremeGeometry &extremeGeometry) |
calculate route between lanes 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 | 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) |
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 | drawDottedContourLane (const DottedContourType type, const GUIVisualizationSettings &s, const DottedGeometry &dottedGeometry, const double width, const bool drawFirstExtrem, const bool drawLastExtrem) |
draw dotted contour for the given dottedGeometry (used by lanes, routes, etc.) More... | |
static void | drawDottedContourShape (const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double width, const double exaggeration) |
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) |
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 | drawSegmentGeometry (const GNEViewNet *viewNet, const SegmentGeometry::Segment &segment, const double width) |
draw geometry segment 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 void | updateGeometricPath (GNEGeometry::SegmentGeometry &segmentGeometry, const GNELane *lane, GNEGeometry::ExtremeGeometry &extremeGeometry) |
calculate route between edges 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 55 of file GNEGeometry.h.
|
strong |
Enumerator | |
---|---|
INSPECT | |
FRONT | |
MOVE |
Definition at line 150 of file GNEGeometry.h.
|
static |
adjust start and end positions in geometric path
Definition at line 1039 of file GNEGeometry.cpp.
References GNELane::getLaneShape(), and PositionVector::length().
Referenced by calculateLaneGeometricPath(), and updateGeometricPath().
|
staticprivate |
normalize angle for lookup in myCircleCoords
Definition at line 1596 of file GNEGeometry.cpp.
References CIRCLE_RESOLUTION, and myCircleCoords.
Referenced by getVertexCircleAroundPosition().
|
static |
calculate route between lanes
segmentGeometry segment geometry to be updated
path list of pathElements (lanes)
extremeGeometry | ExtremeGeometry used to cut/adjust shape |
Definition at line 1068 of file GNEGeometry.cpp.
References adjustStartPosGeometricPath(), GNEGeometry::SegmentGeometry::clearSegmentGeometry(), GNEGeometry::Lane2laneConnection::exist(), GNELane::getLane2laneConnections(), GNELane::getLaneShape(), GNEGeometry::SegmentGeometry::insertCustomSegment(), GNEGeometry::SegmentGeometry::insertLane2LaneSegment(), GNEGeometry::SegmentGeometry::insertLaneSegment(), Position::INVALID, GNEGeometry::ExtremeGeometry::laneEndPosition, GNEGeometry::ExtremeGeometry::laneStartPosition, GNEGeometry::Geometry::updateGeometry(), GNEGeometry::ExtremeGeometry::viewEndPos, and GNEGeometry::ExtremeGeometry::viewStartPos.
Referenced by GNEDetectorE2::updateGeometry(), GNEPersonTrip::updateGeometry(), GNERide::updateGeometry(), GNERoute::updateGeometry(), GNEVehicle::updateGeometry(), and GNEWalk::updateGeometry().
return length between two points (used in geometric calculations)
Definition at line 1032 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 1025 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 dotted contour for the given Position and radius (used by Juctions and POIs)
Definition at line 1534 of file GNEGeometry.cpp.
References drawDottedContourClosedShape(), and getVertexCircleAroundPosition().
Referenced by GNEAccess::drawGL(), GNEPOI::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), and GNEJunction::drawGL().
|
static |
draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs)
Definition at line 1494 of file GNEGeometry.cpp.
References GNEGeometry::DottedGeometry::drawFrontDottedGeometry(), GNEGeometry::DottedGeometry::drawInspectedDottedGeometry(), GLO_DOTTEDCONTOUR_FRONT, GLO_DOTTEDCONTOUR_INSPECTED, INSPECT, and PositionVector::scaleRelative().
Referenced by drawDottedContourCircle(), drawDottedSquaredShape(), GNEPoly::drawGL(), GNETAZ::drawGL(), and GNEJunction::drawGL().
|
static |
draw dotted contour for the given dottedGeometries (used by edges)
Definition at line 1432 of file GNEGeometry.cpp.
References GNEGeometry::DottedGeometryColor::changeColor(), drawDottedContourLane(), GNEGeometry::DottedGeometry::drawFrontDottedGeometry(), GNEGeometry::DottedGeometry::drawInspectedDottedGeometry(), FRONT, OptionsCont::getBool(), GNELane::getDottedLaneGeometry(), GNEEdge::getLanes(), OptionsCont::getOptions(), GLO_DOTTEDCONTOUR_FRONT, GLO_DOTTEDCONTOUR_INSPECTED, GNELane::LaneDrawingConstants::halfWidth, INSPECT, GNEGeometry::DottedGeometry::invertOffset(), GNEGeometry::DottedGeometry::moveShapeToSide(), and GNEGeometry::DottedGeometryColor::reset().
Referenced by GNEEdge::drawGL(), GNEEdgeData::drawPartialGL(), and GNEEdgeRelData::drawPartialGL().
|
static |
draw dotted contour for the given dottedGeometry (used by lanes, routes, etc.)
Definition at line 1383 of file GNEGeometry.cpp.
References GNEGeometry::DottedGeometryColor::changeColor(), GNEGeometry::DottedGeometry::drawFrontDottedGeometry(), GNEGeometry::DottedGeometry::drawInspectedDottedGeometry(), FRONT, GLO_DOTTEDCONTOUR_FRONT, GLO_DOTTEDCONTOUR_INSPECTED, INSPECT, GNEGeometry::DottedGeometry::invertOffset(), GNEGeometry::DottedGeometry::moveShapeToSide(), and GNEGeometry::DottedGeometryColor::reset().
Referenced by GNEGeometry::HierarchicalConnections::drawDottedConnection(), drawDottedContourEdge(), drawDottedContourShape(), GNEConnection::drawGL(), GNELane::drawGL(), GNEAdditional::drawPartialGL(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartialJunction(), and GNEDemandElement::drawPersonPlanPartialLane().
|
static |
draw dotted contour for the given shape (used by additionals)
Definition at line 1525 of file GNEGeometry.cpp.
References drawDottedContourLane().
Referenced by GNEBusStop::drawGL(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEDetectorE2::drawGL(), GNEParkingArea::drawGL(), GNEPoly::drawGL(), GNERouteProbe::drawGL(), GNETAZ::drawGL(), GNEVaporizer::drawGL(), GNECrossing::drawGL(), and GNELane::drawLaneAsRailway().
|
static |
draw dotted squared contour (used by additionals and demand elements)
Definition at line 1545 of file GNEGeometry.cpp.
References PositionVector::add(), DEG2RAD, drawDottedContourClosedShape(), and PositionVector::rotate2D().
Referenced by GNECalibrator::drawCalibratorSymbol(), GNEDetectorE1::drawGL(), GNEDetectorE1Instant::drawGL(), GNEDetectorE3::drawGL(), GNEParkingSpace::drawGL(), GNEPOI::drawGL(), GNERerouter::drawGL(), GNERerouterSymbol::drawGL(), GNEVariableSpeedSign::drawGL(), GNEPerson::drawGL(), and GNEVehicle::drawGL().
|
static |
draw geometry
Definition at line 1203 of file GNEGeometry.cpp.
References Position::distanceSquaredTo2D(), GLHelper::drawBoxLines(), GLHelper::drawFilledCircle(), GUIVisualizationSettings::drawForPositionSelection, GUIVisualizationSettings::getCircleResolution(), GUISUMOAbstractView::getPositionInformation(), GNEGeometry::Geometry::getShape(), GNEGeometry::Geometry::getShapeLengths(), GNEGeometry::Geometry::getShapeRotations(), GUISUMOAbstractView::getVisualisationSettings(), PositionVector::nearest_offset_to_point2D(), PositionVector::positionAtOffset2D(), Position::x(), and Position::y().
Referenced by GNEBusStop::drawGL(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEDetectorE2::drawGL(), GNEParkingArea::drawGL(), GNEPoly::drawGL(), GNERouteProbe::drawGL(), GNETAZ::drawGL(), GNEVaporizer::drawGL(), GNEPersonStop::drawGL(), GNEStop::drawGL(), GNEInternalLane::drawGL(), GNEJunction::drawGL(), GNELane::drawMarkings(), GNEAdditional::drawPartialGL(), GNEEdgeRelData::drawPartialGL(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartialJunction(), and GNEViewNet::drawTemporalJunction().
|
static |
draw geometry points
Definition at line 1228 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(), PositionVector::isClosed(), GLHelper::setColor(), and toString().
Referenced by GNEPoly::drawGL(), GNETAZ::drawGL(), GNEConnection::drawGL(), GNECrossing::drawGL(), GNEJunction::drawGL(), and GNEAdditionalFrame::E2MultilaneLaneSelector::drawTemporalE2Multilane().
|
static |
draw lane geometry (use their own function due colors)
Definition at line 1327 of file GNEGeometry.cpp.
References Position::distanceSquaredTo2D(), GLHelper::drawBoxLines(), GLHelper::drawFilledCircle(), GUIVisualizationSettings::drawForPositionSelection, GUIVisualizationSettings::getCircleResolution(), GUISUMOAbstractView::getPositionInformation(), GUISUMOAbstractView::getVisualisationSettings(), PositionVector::nearest_offset_to_point2D(), PositionVector::positionAtOffset2D(), Position::x(), and Position::y().
Referenced by GNELane::drawGL(), GNELane::drawLaneAsRailway(), GNEEdgeData::drawPartialGL(), and GNEEdgeRelData::drawPartialGL().
|
static |
draw moving hint
Definition at line 1284 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, PositionVector::positionAtOffset2D(), GLHelper::setColor(), Position::x(), and Position::y().
Referenced by GNEPoly::drawGL(), GNETAZ::drawGL(), GNEConnection::drawGL(), GNECrossing::drawGL(), and GNEJunction::drawGL().
|
static |
draw geometry segment
Definition at line 1357 of file GNEGeometry.cpp.
References Position::distanceSquaredTo2D(), GLHelper::drawBoxLines(), GLHelper::drawFilledCircle(), GUIVisualizationSettings::drawForPositionSelection, GUIVisualizationSettings::getCircleResolution(), GUISUMOAbstractView::getPositionInformation(), GNEGeometry::SegmentGeometry::Segment::getShape(), GNEGeometry::SegmentGeometry::Segment::getShapeLengths(), GNEGeometry::SegmentGeometry::Segment::getShapeRotations(), GUISUMOAbstractView::getVisualisationSettings(), PositionVector::nearest_offset_to_point2D(), PositionVector::positionAtOffset2D(), Position::x(), and Position::y().
Referenced by GNEAdditional::drawPartialGL(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), and GNEDemandElement::drawPersonPlanPartialLane().
|
static |
get a circle around the given position
Definition at line 1566 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 1589 of file GNEGeometry.cpp.
Referenced by GNECalibrator::drawCalibratorSymbol(), GNEDetector::drawDetectorLogo(), GNEDetector::drawE1Shape(), GNEDetectorEntryExit::drawGL(), GNERerouterSymbol::drawGL(), GNERouteProbe::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), GNEStoppingPlace::drawLines(), GNEViewNetHelper::LockIcon::drawLockIcon(), and GNEStoppingPlace::drawSign().
|
static |
calculate route between edges
segmentGeometry segment geometry to be updated
lane GNELane that called this function
extremeGeometry | ExtremeGeometry used to cut/adjust shape |
Definition at line 1137 of file GNEGeometry.cpp.
References adjustStartPosGeometricPath(), GNEGeometry::SegmentGeometry::begin(), GNEGeometry::SegmentGeometry::end(), GNEGeometry::SegmentGeometry::front(), GNEGeometry::SegmentGeometry::Segment::getLane(), GNELane::getLaneShape(), Position::INVALID, GNEGeometry::ExtremeGeometry::laneEndPosition, GNEGeometry::ExtremeGeometry::laneStartPosition, GNEGeometry::SegmentGeometry::size(), GNEGeometry::SegmentGeometry::updateCustomSegment(), GNEGeometry::Geometry::updateGeometry(), GNEGeometry::SegmentGeometry::updateLane2LaneSegment(), GNEGeometry::ExtremeGeometry::viewEndPos, and GNEGeometry::ExtremeGeometry::viewStartPos.
Referenced by GNEAdditional::updatePartialGeometry(), and GNEDemandElement::updatePartialGeometry().
|
staticprivate |
Storage for precomputed sin/cos-values describing a circle.
Definition at line 574 of file GNEGeometry.h.
Referenced by angleLookup(), and getVertexCircleAroundPosition().