![]() |
Eclipse SUMO - Simulation of Urban MObility
|
class for NETEDIT geometries over lanes More...
#include <GNEGeometry.h>
Public Member Functions | |
Geometry () | |
constructor More... | |
Geometry (const PositionVector &shape) | |
parameter constructor More... | |
Geometry (const PositionVector &shape, const std::vector< double > &shapeRotations, const std::vector< double > &shapeLengths) | |
parameter constructor 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 | scaleGeometry (const double scale) |
scale geometry More... | |
void | updateGeometry (const Geometry &geometry) |
update geometry (using a new shape, rotations and lenghts) More... | |
void | updateGeometry (const GNEAdditional *additional) |
update geometry (using geometry of another additional) More... | |
void | updateGeometry (const GNELane *lane) |
update geometry (using a lane) More... | |
void | updateGeometry (const GNELane *lane, const double posOverLane) |
update position and rotation (using a lane and a position over lane) More... | |
void | updateGeometry (const Position &position, const double rotation) |
update position and rotation More... | |
void | updateGeometry (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... | |
void | clearGeometry () |
clear geometry More... | |
Geometry & | operator= (const Geometry &other)=delete |
Invalidated assignment operator. More... | |
Private Attributes | |
const GNEAdditional * | myAdditional |
additional (to use additional geometry) More... | |
const GNELane * | myLane |
lane (to use lane geometry) 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... | |
class for NETEDIT geometries over lanes
Definition at line 76 of file GNEGeometry.h.
GNEGeometry::Geometry::Geometry | ( | ) |
constructor
Definition at line 56 of file GNEGeometry.cpp.
GNEGeometry::Geometry::Geometry | ( | const PositionVector & | shape | ) |
parameter constructor
Definition at line 62 of file GNEGeometry.cpp.
References calculateShapeRotationsAndLengths().
GNEGeometry::Geometry::Geometry | ( | const PositionVector & | shape, |
const std::vector< double > & | shapeRotations, | ||
const std::vector< double > & | shapeLengths | ||
) |
parameter constructor
Definition at line 71 of file GNEGeometry.cpp.
|
private |
calculate shape rotations and lengths
Definition at line 252 of file GNEGeometry.cpp.
References GNEGeometry::calculateLength(), and GNEGeometry::calculateRotation().
Referenced by Geometry().
|
private |
clear geometry
Definition at line 240 of file GNEGeometry.cpp.
const PositionVector & GNEGeometry::Geometry::getShape | ( | ) | const |
The shape of the additional element.
Definition at line 205 of file GNEGeometry.cpp.
Referenced by GNEAdditional::drawAdditionalID(), GNEAdditional::drawAdditionalName(), GNELane::drawArrows(), GNEBusStop::drawConnectionAccess(), GNEDetector::drawDetectorLogo(), GNELane::drawDirectionIndicators(), GNEDetector::drawE1Shape(), GNEGeometry::drawGeometry(), GNEAccess::drawGL(), GNEBusStop::drawGL(), GNECalibrator::drawGL(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorE1Instant::drawGL(), GNEDetectorE2::drawGL(), GNEDetectorEntryExit::drawGL(), GNEParkingArea::drawGL(), GNEPoly::drawGL(), GNERouteProbe::drawGL(), GNETAZ::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), GNEPersonStop::drawGL(), GNEStop::drawGL(), GNEVehicle::drawGL(), GNEConnection::drawGL(), GNECrossing::drawGL(), GNEInternalLane::drawGL(), GNELane::drawGL(), GNELane::drawLane2LaneConnections(), GNELane::drawLaneAsRailway(), GNEStoppingPlace::drawLines(), GNELane::drawLinkNo(), GNEViewNetHelper::LockIcon::drawLockIcon(), GNELane::drawMarkings(), GNEStoppingPlace::drawSign(), GNEAdditionalFrame::E2MultilaneLaneSelector::drawTemporalE2Multilane(), GNEFrameModuls::PathCreator::drawTemporalRoute(), GNELane::drawTLSLinkNo(), GNEPersonStop::getCenteringBoundary(), GNEStop::getCenteringBoundary(), GNEVehicle::getCenteringBoundary(), GNELane::getColorValue(), GNEConnection::getConnectionShape(), GNELane::getLaneShapeLength(), GNEAdditional::getPopUpMenu(), GNELane::getPopUpMenu(), GNEVehicle::getPositionInView(), GNELane::setFunctionalColor(), GNELane::setMultiColor(), GNEAccess::updateCenteringBoundary(), GNECalibrator::updateCenteringBoundary(), GNEDetector::updateCenteringBoundary(), GNEDetectorE3::updateCenteringBoundary(), GNERerouter::updateCenteringBoundary(), GNERouteProbe::updateCenteringBoundary(), GNEStoppingPlace::updateCenteringBoundary(), GNEVaporizer::updateCenteringBoundary(), GNEVariableSpeedSign::updateCenteringBoundary(), GNEConnection::updateCenteringBoundary(), GNEInternalLane::updateCenteringBoundary(), GNEBusStop::updateGeometry(), GNEChargingStation::updateGeometry(), GNEContainerStop::updateGeometry(), GNEParkingArea::updateGeometry(), GNEVariableSpeedSignSymbol::updateGeometry(), GNELane::updateGeometry(), and updateGeometry().
const std::vector< double > & GNEGeometry::Geometry::getShapeLengths | ( | ) | const |
The lengths of the single shape parts.
Definition at line 229 of file GNEGeometry.cpp.
Referenced by GNELane::drawDirectionIndicators(), GNEGeometry::drawGeometry(), GNEPersonStop::drawGL(), GNEStop::drawGL(), GNEConnection::drawGL(), GNECrossing::drawGL(), GNELane::drawGL(), GNELane::drawLaneAsRailway(), GNELane::drawMarkings(), GNELane::getShapeLengths(), and updateGeometry().
const std::vector< double > & GNEGeometry::Geometry::getShapeRotations | ( | ) | const |
The rotations of the single shape parts.
Definition at line 217 of file GNEGeometry.cpp.
Referenced by GNEAdditional::drawAdditionalID(), GNEAdditional::drawAdditionalName(), GNEDetector::drawDetectorLogo(), GNELane::drawDirectionIndicators(), GNEDetector::drawE1Shape(), GNEGeometry::drawGeometry(), GNECalibrator::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorE1Instant::drawGL(), GNEDetectorEntryExit::drawGL(), GNERouteProbe::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), GNEPersonStop::drawGL(), GNEStop::drawGL(), GNEVehicle::drawGL(), GNEConnection::drawGL(), GNECrossing::drawGL(), GNELane::drawGL(), GNELane::drawLaneAsRailway(), GNEViewNetHelper::LockIcon::drawLockIcon(), GNELane::drawMarkings(), GNELane::getShapeRotations(), and updateGeometry().
Invalidated assignment operator.
void GNEGeometry::Geometry::scaleGeometry | ( | const double | scale | ) |
scale geometry
Definition at line 194 of file GNEGeometry.cpp.
Referenced by GNEPoly::drawGL(), and GNETAZ::drawGL().
void GNEGeometry::Geometry::updateGeometry | ( | const Geometry & | geometry | ) |
update geometry (using a new shape, rotations and lenghts)
Definition at line 183 of file GNEGeometry.cpp.
References getShape(), getShapeLengths(), and getShapeRotations().
void GNEGeometry::Geometry::updateGeometry | ( | const GNEAdditional * | additional | ) |
update geometry (using geometry of another additional)
Definition at line 174 of file GNEGeometry.cpp.
void GNEGeometry::Geometry::updateGeometry | ( | const GNELane * | lane | ) |
update geometry (using a lane)
Definition at line 165 of file GNEGeometry.cpp.
void GNEGeometry::Geometry::updateGeometry | ( | const GNELane * | lane, |
const double | posOverLane | ||
) |
update position and rotation (using a lane and a position over lane)
Definition at line 145 of file GNEGeometry.cpp.
References GNELane::getLaneShape(), PositionVector::length(), PositionVector::positionAtOffset(), and PositionVector::rotationDegreeAtOffset().
void GNEGeometry::Geometry::updateGeometry | ( | const Position & | position, |
const double | rotation | ||
) |
update position and rotation
Definition at line 135 of file GNEGeometry.cpp.
void GNEGeometry::Geometry::updateGeometry | ( | const PositionVector & | shape, |
double | startPos = -1 , |
||
double | endPos = -1 , |
||
const Position & | extraFirstPosition = Position::INVALID , |
||
const Position & | extraLastPosition = Position::INVALID |
||
) |
update geometry shape
shape | Shape to be updated |
extremeGeometry | ExtremeGeometry used to cut/adjust shape |
Definition at line 81 of file GNEGeometry.cpp.
References Position::INVALID, PositionVector::length(), and PositionVector::splitAt().
Referenced by GNEGeometry::calculateLaneGeometricPath(), GNEAdditional::calculatePerpendicularLine(), GNEJunction::drawGL(), GNEViewNet::drawTemporalJunction(), GNEPoly::setMoveShape(), GNETAZ::setMoveShape(), GNEStoppingPlace::setStoppingPlaceGeometry(), GNEGeometry::HierarchicalConnections::update(), GNEDemandElement::updateDemandElementGeometry(), GNEDemandElement::updateDemandElementSpreadGeometry(), GNEGeometry::updateGeometricPath(), GNEAccess::updateGeometry(), GNECalibrator::updateGeometry(), GNECalibratorFlow::updateGeometry(), GNEClosingLaneReroute::updateGeometry(), GNEClosingReroute::updateGeometry(), GNEDetectorE1::updateGeometry(), GNEDetectorE1Instant::updateGeometry(), GNEDetectorE2::updateGeometry(), GNEDetectorE3::updateGeometry(), GNEDetectorEntryExit::updateGeometry(), GNEPoly::updateGeometry(), GNERerouter::updateGeometry(), GNERerouterSymbol::updateGeometry(), GNETAZ::updateGeometry(), GNEVariableSpeedSign::updateGeometry(), GNEVariableSpeedSignSymbol::updateGeometry(), GNEPersonStop::updateGeometry(), GNEStop::updateGeometry(), GNEVehicle::updateGeometry(), GNEConnection::updateGeometry(), GNECrossing::updateGeometry(), and GNELane::updateGeometry().
|
private |
additional (to use additional geometry)
Definition at line 143 of file GNEGeometry.h.
|
private |
lane (to use lane geometry)
Definition at line 140 of file GNEGeometry.h.
|
private |
element shape
Definition at line 131 of file GNEGeometry.h.
|
private |
The lengths of the shape (note: Always size = myShape.size()-1)
Definition at line 137 of file GNEGeometry.h.
|
private |
The rotations of the shape (note: Always size = myShape.size()-1)
Definition at line 134 of file GNEGeometry.h.