![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEGeometry.h>
Data Structures | |
struct | Geometry |
struct for pack all variables related with geometry of stop More... | |
struct | Lane2laneConnection |
lane2lane struct More... | |
struct | ParentConnections |
struct for pack all variables and functions relative to connections between hierarchical element and their children More... | |
struct | SegmentGeometry |
struct for pack all variables related with geometry of elemements divided in segments More... | |
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 | calculateEdgeGeometricPath (const GNEAttributeCarrier *AC, GNEGeometry::SegmentGeometry &segmentGeometry, const std::vector< GNEEdge * > &edges, const SUMOVehicleClass vClass, GNELane *fromLane, GNELane *toLane, double startPos=-1, double endPos=-1, const Position &extraFirstPosition=Position::INVALID, const Position &extraLastPosition=Position::INVALID) |
calculate route between edges More... | |
static void | calculateLaneGeometricPath (const GNEAttributeCarrier *AC, GNEGeometry::SegmentGeometry &segmentGeometry, const std::vector< GNELane * > &lanes, double startPos=-1, double endPos=-1, const Position &extraFirstPosition=Position::INVALID, const Position &extraLastPosition=Position::INVALID) |
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 | drawGeometry (const GNEViewNet *viewNet, const Geometry &geometry, const double width) |
draw geometry 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 | drawSegmentGeometry (const GNEViewNet *viewNet, const SegmentGeometry::Segment &segment, const double width) |
draw geometry segment More... | |
static void | updateGeometricPath (GNEGeometry::SegmentGeometry &segmentGeometry, const GNEEdge *edge, double startPos=-1, double endPos=-1, const Position &extraFirstPosition=Position::INVALID, const Position &extraLastPosition=Position::INVALID) |
calculate route between edges More... | |
Definition at line 53 of file GNEGeometry.h.
|
static |
adjust start and end positions in geometric path
Definition at line 562 of file GNEGeometry.cpp.
References GNELane::getLaneShape(), PositionVector::length(), and POSITION_EPS.
Referenced by calculateLaneGeometricPath(), and updateGeometricPath().
|
static |
calculate route between edges
AC attribute carrier's segment
segmentGeometry segment geometry to be updated
edges list of edges
startPos | start position in the first lane (if -1, then starts at the beginning of lane) |
endPos | end position in the last lane (if -1, then ends at the end of lane) |
extraFirstPosition | extra first position (if is Position::INVALID, then it's ignored) |
extraLastPosition | extra last position (if is Position::INVALID, then it's ignored) |
Definition at line 591 of file GNEGeometry.cpp.
References calculateLaneGeometricPath(), GNEGeometry::SegmentGeometry::clearSegmentGeometry(), GNEGeometry::SegmentGeometry::front(), GNEAttributeCarrier::getTagProperty(), and GNEAttributeCarrier::TagProperties::isRide().
Referenced by GNERide::updateGeometry(), GNEPersonTrip::updateGeometry(), GNEWalk::updateGeometry(), GNERoute::updateGeometry(), and GNEVehicle::updateGeometry().
|
static |
calculate route between lanes
AC attribute carrier's segment
segmentGeometry segment geometry to be updated
lanes list of lanes
startPos | start position in the first lane (if -1, then starts at the beginning of lane) |
endPos | end position in the last lane (if -1, then ends at the end of lane) |
extraFirstPosition | extra first position (if is Position::INVALID, then it's ignored) |
extraLastPosition | extra last position (if is Position::INVALID, then it's ignored) |
Definition at line 640 of file GNEGeometry.cpp.
References adjustStartPosGeometricPath(), GNEGeometry::SegmentGeometry::clearSegmentGeometry(), GNEGeometry::Lane2laneConnection::connectionsMap, GNELane::getLane2laneConnections(), GNELane::getLaneShape(), GNEGeometry::Geometry::getShape(), GNEGeometry::Geometry::getShapeLengths(), GNEGeometry::Geometry::getShapeRotations(), GNEGeometry::SegmentGeometry::insertCustomSegment(), GNEGeometry::SegmentGeometry::insertLane2LaneSegment(), GNEGeometry::SegmentGeometry::insertLaneSegment(), Position::INVALID, and GNEGeometry::Geometry::updateGeometryShape().
Referenced by calculateEdgeGeometricPath(), and GNEDetectorE2::updateGeometry().
return length between two points (used in geometric calculations)
Definition at line 555 of file GNEGeometry.cpp.
References Position::distanceTo2D().
Referenced by GNEGeometry::Geometry::calculateShapeRotationsAndLengths(), and GNEViewNet::drawLaneCandidates().
return angle between two points (used in geometric calculations)
Definition at line 548 of file GNEGeometry.cpp.
References M_PI, Position::x(), and Position::y().
Referenced by GNEGeometry::Geometry::calculateShapeRotationsAndLengths(), GNELane::drawArrows(), and GNEViewNet::drawLaneCandidates().
|
static |
draw geometry
Definition at line 795 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(), GNEContainerStop::drawGL(), GNEChargingStation::drawGL(), GNEParkingArea::drawGL(), GNEInternalLane::drawGL(), GNEDetectorE2::drawGL(), GNEStop::drawGL(), and GNELane::drawMarkings().
|
static |
draw lane geometry (use their own function due colors)
Definition at line 820 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().
|
static |
draw geometry segment
Definition at line 850 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 GNELane::drawPartialE2DetectorPlan(), GNEEdge::drawPartialPersonPlan(), GNEEdge::drawPartialRoute(), and GNEEdge::drawPartialTripFromTo().
|
static |
calculate route between edges
segmentGeometry segment geometry to be updated
edge called edge
startPos | start position in the first lane (if -1, then starts at the beginning of lane) |
endPos | end position in the last lane (if -1, then ends at the end of lane) |
extraFirstPosition | extra first position (if is Position::INVALID, then it's ignored) |
extraLastPosition | extra last position (if is Position::INVALID, then it's ignored) |
Definition at line 719 of file GNEGeometry.cpp.
References adjustStartPosGeometricPath(), GNEGeometry::SegmentGeometry::begin(), GNEGeometry::SegmentGeometry::Segment::edge, GNEGeometry::SegmentGeometry::end(), GNEGeometry::SegmentGeometry::front(), GNELane::getLaneShape(), GNEGeometry::Geometry::getShape(), GNEGeometry::Geometry::getShapeLengths(), GNEGeometry::Geometry::getShapeRotations(), Position::INVALID, GNEGeometry::SegmentGeometry::Segment::lane, GNEGeometry::SegmentGeometry::size(), GNEGeometry::SegmentGeometry::updateCustomSegment(), GNEGeometry::Geometry::updateGeometryShape(), and GNEGeometry::SegmentGeometry::updateLane2LaneSegment().
Referenced by GNERide::updatePartialGeometry(), GNEPersonTrip::updatePartialGeometry(), GNEWalk::updatePartialGeometry(), GNERoute::updatePartialGeometry(), and GNEVehicle::updatePartialGeometry().