 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
125 const PositionVector& shape,
const std::vector<double>& shapeRotations,
const std::vector<double>& shapeLengths,
const bool _valid);
131 void update(
const PositionVector& shape,
const std::vector<double>& shapeRotations,
const std::vector<double>& shapeLengths);
205 const PositionVector& laneShape,
const std::vector<double>& laneShapeRotations,
const std::vector<double>& laneShapeLengths,
const bool valid);
211 void updateCustomSegment(
const int segmentIndex,
const PositionVector& newLaneShape,
const std::vector<double>& newLaneShapeRotations,
const std::vector<double>& newLaneShapeLengths);
232 std::vector<Segment>::const_iterator
begin()
const;
235 std::vector<Segment>::const_iterator
end()
const;
345 const std::vector<double>& lengths,
const std::vector<RGBColor>& colors,
double width);
static double calculateLength(const Position &first, const Position &second)
return length between two points (used in geometric calculations)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Lane2laneConnection(const GNELane *originLane)
constructor
An Element which don't belongs to GNENet but has influency in the simulation.
An Element which don't belongs to GNENet but has influency in the simulation.
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
std::vector< Segment > myShapeSegments
vector of segments that constitutes the shape
void updateGeometryShape(const PositionVector &shape, double startPos=-1, double endPos=-1, const Position &extraFirstPosition=Position::INVALID, const Position &extraLastPosition=Position::INVALID)
update geometry shape
GNEHierarchicalParentElements * myHierarchicalElement
pointer to hierarchical element parent
static void drawSegmentGeometry(const GNEViewNet *viewNet, const SegmentGeometry::Segment &segment, const double width)
draw geometry segment
struct for pack all variables and functions relative to connections between hierarchical element and ...
static const Position INVALID
used to indicate that a position is valid
const std::vector< double > & getShapeLengths() const
The lengths of the single shape parts.
ParentConnections(GNEHierarchicalParentElements *hierarchicalElement)
constructor
const GNEAttributeCarrier * AC
element
void insertLaneSegment(const GNEAttributeCarrier *AC, const GNELane *lane, const bool valid)
insert entire lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAn...
SegmentToUpdate & operator=(const SegmentToUpdate &other)=delete
Invalidated assignment operator.
double getFirstRotation() const
get first rotation (or Invalid position if segments are empty)
void updateGeometryPosition(const GNELane *lane, const double posOverLane)
update position and rotation
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)
void clearSegmentGeometry()
clear element geometry
void calculateShapeRotationsAndLengths()
calculate shape rotations and lengths
void insertLane2LaneSegment(const GNEAttributeCarrier *AC, const GNELane *currentLane, const GNELane *nextLane, const bool valid)
insert entire lane2lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotati...
const Position & getLastPosition() const
get first position (or Invalid position if segments are empty)
Geometry & operator=(const Geometry &other)=delete
Invalidated assignment operator.
Position myPosition
get single position
Segment(const GNEAttributeCarrier *_AC, const GNELane *_lane, const bool _valid)
parameter constructor for lanes (geometry will be taked from lane)
void updateLane2LaneSegment(const int segmentIndex, const GNELane *lane, const GNELane *nextLane)
update lane2Lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndL...
void insertCustomSegment(const GNEAttributeCarrier *AC, const GNELane *lane, const PositionVector &laneShape, const std::vector< double > &laneShapeRotations, const std::vector< double > &laneShapeLengths, const bool valid)
insert custom segment
A road/street connecting two junctions (netedit-version)
const std::vector< double > & getShapeLengths() const
get lane/lane2lane shape lengths
PositionVector mySegmentShape
segment shape
SegmentGeometry & operator=(const SegmentGeometry &other)=delete
Invalidated assignment operator.
SegmentToUpdate(const int _index, const GNELane *_lane, const GNELane *_nextLane)
constructor
struct for pack all variables related with geometry of elemements divided in segments
std::vector< double > myShapeRotations
The rotations of the shape (note: Always size = myShape.size()-1)
const PositionVector & getShape() const
The shape of the additional element.
void update(const PositionVector &shape, const std::vector< double > &shapeRotations, const std::vector< double > &shapeLengths)
update segment
bool myUseLane2LaneShape
flag to use lane2lane connection
std::vector< std::pair< Position, double > > symbolsPositionAndRotation
position and rotation of every symbol over lane
A class that stores a 2D geometrical boundary.
void updateLane2laneConnection()
update
double getRotation() const
get rotation
static void drawGeometry(const GNEViewNet *viewNet, const Geometry &geometry, const double width)
draw geometry
void update()
update Connection's geometry
std::vector< Segment >::const_iterator begin() const
begin iterator
A point in 2D or 3D with translation and scaling methods.
void updateCustomSegment(const int segmentIndex, const PositionVector &newLaneShape, const std::vector< double > &newLaneShapeRotations, const std::vector< double > &newLaneShapeLengths)
update custom segment
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
std::vector< double > mySegmentRotations
segment rotation
struct for pack all variables related with geometry of stop
Boundary getBoxBoundary() const
Returns a boundary enclosing all segments.
const Position & getFirstPosition() const
get first position (or Invalid position if segments are empty)
const Position & getPosition() const
get Position
bool myUseLaneShape
flag to use lane shape
const std::vector< double > & getShapeRotations() const
get lane/lane2lane shape rotations
struct used for represent segments of element geometry
SegmentGeometry()
constructor
An special type of Attribute carrier that owns hierarchical elements.
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
std::vector< double > myShapeLengths
The lengths of the shape (note: Always size = myShape.size()-1)
const Segment & front() const
front segment
double myRotation
get single rotation
Segment & operator=(const Segment &other)=delete
Invalidated assignment operator.
std::vector< double > mySegmentLengths
segment lengths
std::vector< PositionVector > connectionPositions
Matrix with the Vertex's positions of connections between parents an their children.
int size() const
number of segments
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
static void adjustStartPosGeometricPath(double &startPos, const GNELane *startLane, double &endPos, const GNELane *endLane)
adjust start and end positions in geometric path
static double calculateRotation(const Position &first, const Position &second)
return angle between two points (used in geometric calculations)
const int index
segment index
const GNELane * nextLane
lane segment (used for updating lane2lane segments)
Stores the information about how to visualize structures.
PositionVector myShape
element shape
const GNEJunction * junction
junction
const PositionVector & getShape() const
get lane/lane2lane shape
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
struct used for represent segments that must be updated
std::map< const GNELane *, Geometry > connectionsMap
connection shape
std::vector< Segment >::const_iterator end() const
end iterator
const Segment & back() const
back segment
void updateGeometry(const GNEAdditional *additional)
update geometry (using geometry of another additional)
Lane2laneConnection & operator=(const Lane2laneConnection &other)=delete
Invalidated assignment operator.
const GNELane * myOriginLane
origin lane
void draw(const GUIVisualizationSettings &s, const GUIGlObjectType parentType) const
draw connections between Parent and childrens