![]() |
Eclipse SUMO - Simulation of Urban MObility
|
struct for pack all variables related with geometry of stop More...
#include <GNEGeometry.h>
Public Member Functions | |
Geometry () | |
constructor More... | |
const Position & | getPosition () const |
get Position More... | |
double | getRotation () const |
get rotation More... | |
const PositionVector & | getShape () const |
The shape of the additional element. More... | |
const std::vector< double > & | getShapeLengths () const |
The lengths of the single shape parts. More... | |
const std::vector< double > & | getShapeRotations () const |
The rotations of the single shape parts. More... | |
void | updateGeometry (const GNEAdditional *additional) |
update geometry (using geometry of another additional) More... | |
void | updateGeometryPosition (const GNELane *lane, const double posOverLane) |
update position and rotation More... | |
void | updateGeometryShape (const PositionVector &shape, double startPos=-1, double endPos=-1, const Position &extraFirstPosition=Position::INVALID, const Position &extraLastPosition=Position::INVALID) |
update geometry shape More... | |
Private Member Functions | |
void | calculateShapeRotationsAndLengths () |
calculate shape rotations and lengths More... | |
Geometry & | operator= (const Geometry &other)=delete |
Invalidated assignment operator. More... | |
Private Attributes | |
Position | myPosition |
get single position More... | |
double | myRotation |
get single rotation More... | |
PositionVector | myShape |
element shape More... | |
std::vector< double > | myShapeLengths |
The lengths of the shape (note: Always size = myShape.size()-1) More... | |
std::vector< double > | myShapeRotations |
The rotations of the shape (note: Always size = myShape.size()-1) More... | |
struct for pack all variables related with geometry of stop
Definition at line 56 of file GNEGeometry.h.
GNEGeometry::Geometry::Geometry | ( | ) |
constructor
Definition at line 41 of file GNEGeometry.cpp.
|
private |
calculate shape rotations and lengths
Definition at line 165 of file GNEGeometry.cpp.
References GNEGeometry::calculateLength(), and GNEGeometry::calculateRotation().
const Position & GNEGeometry::Geometry::getPosition | ( | ) | const |
get Position
Definition at line 127 of file GNEGeometry.cpp.
References Position::INVALID.
Referenced by GNEVaporizer::drawGL(), GNERouteProbe::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorEntryExit::drawGL(), GNEDetectorE1Instant::drawGL(), GNEAccess::drawGL(), and GNECalibrator::drawGL().
double GNEGeometry::Geometry::getRotation | ( | ) | const |
get rotation
Definition at line 137 of file GNEGeometry.cpp.
References Position::INVALID.
Referenced by GNEVaporizer::drawGL(), GNERouteProbe::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorEntryExit::drawGL(), GNEDetectorE1Instant::drawGL(), and GNECalibrator::drawGL().
const PositionVector & GNEGeometry::Geometry::getShape | ( | ) | const |
The shape of the additional element.
Definition at line 147 of file GNEGeometry.cpp.
Referenced by GNEGeometry::calculateLaneGeometricPath(), GNEDemandElement::calculatePersonPlanPositionStartEndPos(), GNELane::drawArrows(), GNELane::drawDirectionIndicators(), GNEGeometry::drawGeometry(), GNEBusStop::drawGL(), GNEContainerStop::drawGL(), GNEChargingStation::drawGL(), GNEParkingArea::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorEntryExit::drawGL(), GNEInternalLane::drawGL(), GNEDetectorE1Instant::drawGL(), GNECrossing::drawGL(), GNEDetectorE2::drawGL(), GNEConnection::drawGL(), GNELane::drawGL(), GNEStop::drawGL(), GNELane::drawLane2LaneConnections(), GNELane::drawLinkNo(), GNELane::drawMarkings(), GNELane::drawTLSLinkNo(), GNEConnection::getBoundary(), GNEBusStop::getCenteringBoundary(), GNEContainerStop::getCenteringBoundary(), GNEChargingStation::getCenteringBoundary(), GNEParkingArea::getCenteringBoundary(), GNEVaporizer::getCenteringBoundary(), GNERouteProbe::getCenteringBoundary(), GNEAccess::getCenteringBoundary(), GNEInternalLane::getCenteringBoundary(), GNECalibrator::getCenteringBoundary(), GNEDetector::getCenteringBoundary(), GNEStop::getCenteringBoundary(), GNELane::getColorValue(), GNEConnection::getConnectionShape(), GNELane::getLaneShapeLength(), GNELane::getPopUpMenu(), GNEAdditional::getPopUpMenu(), GNELane::setFunctionalColor(), GNELane::setMultiColor(), GNEGeometry::updateGeometricPath(), GNEBusStop::updateGeometry(), GNEContainerStop::updateGeometry(), GNEChargingStation::updateGeometry(), GNEParkingArea::updateGeometry(), GNEVaporizer::updateGeometry(), GNERouteProbe::updateGeometry(), GNEAccess::updateGeometry(), GNELane::updateGeometry(), updateGeometry(), GNEDetectorE1::updateGeometry(), GNEDetectorEntryExit::updateGeometry(), GNEDetectorE1Instant::updateGeometry(), and GNEDetectorE2::updateGeometry().
const std::vector< double > & GNEGeometry::Geometry::getShapeLengths | ( | ) | const |
The lengths of the single shape parts.
Definition at line 159 of file GNEGeometry.cpp.
Referenced by GNEGeometry::calculateLaneGeometricPath(), GNELane::drawDirectionIndicators(), GNEGeometry::drawGeometry(), GNECrossing::drawGL(), GNEConnection::drawGL(), GNELane::drawGL(), GNEStop::drawGL(), GNELane::drawMarkings(), GNELane::getShapeLengths(), GNEGeometry::updateGeometricPath(), and updateGeometry().
const std::vector< double > & GNEGeometry::Geometry::getShapeRotations | ( | ) | const |
The rotations of the single shape parts.
Definition at line 153 of file GNEGeometry.cpp.
Referenced by GNEGeometry::calculateLaneGeometricPath(), GNELane::drawDirectionIndicators(), GNEGeometry::drawGeometry(), GNECrossing::drawGL(), GNEConnection::drawGL(), GNELane::drawGL(), GNEStop::drawGL(), GNELane::drawMarkings(), GNELane::getShapeRotations(), GNEGeometry::updateGeometricPath(), and updateGeometry().
Invalidated assignment operator.
void GNEGeometry::Geometry::updateGeometry | ( | const GNEAdditional * | additional | ) |
update geometry (using geometry of another additional)
Definition at line 118 of file GNEGeometry.cpp.
References GNEAdditional::getAdditionalGeometry(), getShape(), getShapeLengths(), and getShapeRotations().
Referenced by GNEStop::updateGeometry(), and GNEStop::updatePartialGeometry().
void GNEGeometry::Geometry::updateGeometryPosition | ( | const GNELane * | lane, |
const double | posOverLane | ||
) |
update position and rotation
Definition at line 100 of file GNEGeometry.cpp.
References GNELane::getLaneShape(), PositionVector::length(), PositionVector::positionAtOffset(), and PositionVector::rotationDegreeAtOffset().
Referenced by GNEVaporizer::updateGeometry(), GNERouteProbe::updateGeometry(), GNEAccess::updateGeometry(), GNEDetectorE1::updateGeometry(), GNEDetectorEntryExit::updateGeometry(), GNEDetectorE1Instant::updateGeometry(), and GNECalibrator::updateGeometry().
void GNEGeometry::Geometry::updateGeometryShape | ( | const PositionVector & | shape, |
double | startPos = -1 , |
||
double | endPos = -1 , |
||
const Position & | extraFirstPosition = Position::INVALID , |
||
const Position & | extraLastPosition = Position::INVALID |
||
) |
update geometry shape
startPos | if is different of -1, then shape will be cut in these first position |
endPos | if is different of -1, then shape will be cut in these last position |
extraFirstPosition | if is different of Position::INVALID, add it in shape front position (after cut) |
extraLastPosition | if is different of Position::INVALID, add it in shape last position (after cut) |
Definition at line 48 of file GNEGeometry.cpp.
References Position::INVALID, PositionVector::length(), POSITION_EPS, and PositionVector::splitAt().
Referenced by GNEGeometry::calculateLaneGeometricPath(), GNEInternalLane::GNEInternalLane(), GNEStoppingPlace::setStoppingPlaceGeometry(), GNEGeometry::updateGeometricPath(), GNEConnection::updateGeometry(), GNECrossing::updateGeometry(), GNELane::updateGeometry(), GNEStop::updateGeometry(), GNEDetectorE2::updateGeometry(), and GNEStop::updatePartialGeometry().
|
private |
get single position
Definition at line 97 of file GNEGeometry.h.
|
private |
get single rotation
Definition at line 100 of file GNEGeometry.h.
|
private |
element shape
Definition at line 103 of file GNEGeometry.h.
|
private |
The lengths of the shape (note: Always size = myShape.size()-1)
Definition at line 109 of file GNEGeometry.h.
|
private |
The rotations of the shape (note: Always size = myShape.size()-1)
Definition at line 106 of file GNEGeometry.h.