Eclipse SUMO - Simulation of Urban MObility
GNEGeometry Struct Reference

#include <GNEGeometry.h>

Collaboration diagram for GNEGeometry:

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...
 

Detailed Description

Definition at line 53 of file GNEGeometry.h.

Member Function Documentation

◆ adjustStartPosGeometricPath()

void GNEGeometry::adjustStartPosGeometricPath ( double &  startPos,
const GNELane startLane,
double &  endPos,
const GNELane endLane 
)
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().

◆ calculateEdgeGeometricPath()

void GNEGeometry::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 
)
static

calculate route between edges

AC attribute carrier's segment

segmentGeometry segment geometry to be updated

edges list of edges

Parameters
startPosstart position in the first lane (if -1, then starts at the beginning of lane)
endPosend position in the last lane (if -1, then ends at the end of lane)
extraFirstPositionextra first position (if is Position::INVALID, then it's ignored)
extraLastPositionextra 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 GNEPersonTrip::updateGeometry(), GNERide::updateGeometry(), GNERoute::updateGeometry(), GNEVehicle::updateGeometry(), and GNEWalk::updateGeometry().

◆ calculateLaneGeometricPath()

void GNEGeometry::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 
)
static

calculate route between lanes

AC attribute carrier's segment

segmentGeometry segment geometry to be updated

lanes list of lanes

Parameters
startPosstart position in the first lane (if -1, then starts at the beginning of lane)
endPosend position in the last lane (if -1, then ends at the end of lane)
extraFirstPositionextra first position (if is Position::INVALID, then it's ignored)
extraLastPositionextra 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().

◆ calculateLength()

double GNEGeometry::calculateLength ( const Position first,
const Position second 
)
static

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().

◆ calculateRotation()

double GNEGeometry::calculateRotation ( const Position first,
const Position second 
)
static

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().

◆ drawGeometry()

◆ drawLaneGeometry()

void GNEGeometry::drawLaneGeometry ( const GNEViewNet viewNet,
const PositionVector shape,
const std::vector< double > &  rotations,
const std::vector< double > &  lengths,
const std::vector< RGBColor > &  colors,
double  width 
)
static

◆ drawSegmentGeometry()

◆ updateGeometricPath()

void GNEGeometry::updateGeometricPath ( GNEGeometry::SegmentGeometry segmentGeometry,
const GNEEdge edge,
double  startPos = -1,
double  endPos = -1,
const Position extraFirstPosition = Position::INVALID,
const Position extraLastPosition = Position::INVALID 
)
static

The documentation for this struct was generated from the following files: