![]() |
Eclipse SUMO - Simulation of Urban MObility
|
struct for pack all variables related with geometry of elemements divided in segments More...
#include <GNEGeometry.h>
Data Structures | |
struct | Segment |
struct used for represent segments of element geometry More... | |
struct | SegmentToUpdate |
struct used for represent segments that must be updated More... | |
Public Member Functions | |
const Segment & | back () const |
back segment More... | |
std::vector< Segment >::const_iterator | begin () const |
begin iterator More... | |
void | clearSegmentGeometry () |
clear element geometry More... | |
std::vector< Segment >::const_iterator | end () const |
end iterator More... | |
const Segment & | front () const |
front segment More... | |
Boundary | getBoxBoundary () const |
Returns a boundary enclosing all segments. More... | |
const Position & | getFirstPosition () const |
get first position (or Invalid position if segments are empty) More... | |
double | getFirstRotation () const |
get first rotation (or Invalid position if segments are empty) More... | |
const Position & | getLastPosition () const |
get first position (or Invalid position if segments are empty) More... | |
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 More... | |
void | insertLane2LaneSegment (const GNEAttributeCarrier *AC, const GNELane *currentLane, const GNELane *nextLane, const bool valid) |
insert entire lane2lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths) More... | |
void | insertLaneSegment (const GNEAttributeCarrier *AC, const GNELane *lane, const bool valid) |
insert entire lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths) More... | |
SegmentGeometry () | |
constructor More... | |
int | size () const |
number of segments More... | |
void | updateCustomSegment (const int segmentIndex, const PositionVector &newLaneShape, const std::vector< double > &newLaneShapeRotations, const std::vector< double > &newLaneShapeLengths) |
update custom segment More... | |
void | updateLane2LaneSegment (const int segmentIndex, const GNELane *lane, const GNELane *nextLane) |
update lane2Lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths) More... | |
Private Member Functions | |
SegmentGeometry & | operator= (const SegmentGeometry &other)=delete |
Invalidated assignment operator. More... | |
Private Attributes | |
std::vector< Segment > | myShapeSegments |
vector of segments that constitutes the shape More... | |
struct for pack all variables related with geometry of elemements divided in segments
Definition at line 116 of file GNEGeometry.h.
GNEGeometry::SegmentGeometry::SegmentGeometry | ( | ) |
constructor
Definition at line 276 of file GNEGeometry.cpp.
const GNEGeometry::SegmentGeometry::Segment & GNEGeometry::SegmentGeometry::back | ( | ) | const |
back segment
Definition at line 381 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEDemandElement::calculatePersonPlanPositionStartEndPos().
std::vector< GNEGeometry::SegmentGeometry::Segment >::const_iterator GNEGeometry::SegmentGeometry::begin | ( | ) | const |
begin iterator
Definition at line 363 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEGeometry::updateGeometricPath().
void GNEGeometry::SegmentGeometry::clearSegmentGeometry | ( | ) |
clear element geometry
Definition at line 317 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEGeometry::calculateEdgeGeometricPath(), and GNEGeometry::calculateLaneGeometricPath().
std::vector< GNEGeometry::SegmentGeometry::Segment >::const_iterator GNEGeometry::SegmentGeometry::end | ( | ) | const |
end iterator
Definition at line 369 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEGeometry::updateGeometricPath().
const GNEGeometry::SegmentGeometry::Segment & GNEGeometry::SegmentGeometry::front | ( | ) | const |
front segment
Definition at line 375 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEGeometry::calculateEdgeGeometricPath(), and GNEGeometry::updateGeometricPath().
Boundary GNEGeometry::SegmentGeometry::getBoxBoundary | ( | ) | const |
Returns a boundary enclosing all segments.
Definition at line 353 of file GNEGeometry.cpp.
References Boundary::add(), and myShapeSegments.
Referenced by GNEDetector::getCenteringBoundary().
const Position & GNEGeometry::SegmentGeometry::getFirstPosition | ( | ) | const |
get first position (or Invalid position if segments are empty)
Definition at line 324 of file GNEGeometry.cpp.
References Position::INVALID, and myShapeSegments.
Referenced by GNEVehicle::drawGL().
double GNEGeometry::SegmentGeometry::getFirstRotation | ( | ) | const |
get first rotation (or Invalid position if segments are empty)
Definition at line 343 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEVehicle::drawGL().
const Position & GNEGeometry::SegmentGeometry::getLastPosition | ( | ) | const |
get first position (or Invalid position if segments are empty)
Definition at line 333 of file GNEGeometry.cpp.
References Position::INVALID, and myShapeSegments.
Referenced by GNEEdge::drawPartialPersonPlan().
void GNEGeometry::SegmentGeometry::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
Definition at line 287 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEGeometry::calculateLaneGeometricPath().
void GNEGeometry::SegmentGeometry::insertLane2LaneSegment | ( | const GNEAttributeCarrier * | AC, |
const GNELane * | currentLane, | ||
const GNELane * | nextLane, | ||
const bool | valid | ||
) |
insert entire lane2lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths)
Definition at line 295 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEGeometry::calculateLaneGeometricPath().
void GNEGeometry::SegmentGeometry::insertLaneSegment | ( | const GNEAttributeCarrier * | AC, |
const GNELane * | lane, | ||
const bool | valid | ||
) |
insert entire lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths)
Definition at line 280 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEGeometry::calculateLaneGeometricPath().
|
privatedelete |
Invalidated assignment operator.
int GNEGeometry::SegmentGeometry::size | ( | ) | const |
number of segments
Definition at line 387 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEDemandElement::calculatePersonPlanPositionStartEndPos(), GNEVehicle::drawGL(), and GNEGeometry::updateGeometricPath().
void GNEGeometry::SegmentGeometry::updateCustomSegment | ( | const int | segmentIndex, |
const PositionVector & | newLaneShape, | ||
const std::vector< double > & | newLaneShapeRotations, | ||
const std::vector< double > & | newLaneShapeLengths | ||
) |
update custom segment
Definition at line 302 of file GNEGeometry.cpp.
References myShapeSegments.
Referenced by GNEGeometry::updateGeometricPath().
void GNEGeometry::SegmentGeometry::updateLane2LaneSegment | ( | const int | segmentIndex, |
const GNELane * | lane, | ||
const GNELane * | nextLane | ||
) |
update lane2Lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths)
Definition at line 308 of file GNEGeometry.cpp.
References GNEGeometry::Lane2laneConnection::connectionsMap, GNELane::getLane2laneConnections(), and myShapeSegments.
Referenced by GNEGeometry::updateGeometricPath().
|
private |
vector of segments that constitutes the shape
Definition at line 248 of file GNEGeometry.h.
Referenced by back(), begin(), clearSegmentGeometry(), end(), front(), getBoxBoundary(), getFirstPosition(), getFirstRotation(), getLastPosition(), insertCustomSegment(), insertLane2LaneSegment(), insertLaneSegment(), size(), updateCustomSegment(), and updateLane2LaneSegment().