Eclipse SUMO - Simulation of Urban MObility
GNEGeometry::Geometry Class Reference

class for NETEDIT geometries over lanes More...

#include <GNEGeometry.h>

Collaboration diagram for GNEGeometry::Geometry:
[legend]

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 PositionVectorgetShape () 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...
 
Geometryoperator= (const Geometry &other)=delete
 Invalidated assignment operator. More...
 

Private Attributes

const GNEAdditionalmyAdditional
 additional (to use additional geometry) More...
 
const GNELanemyLane
 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...
 

Detailed Description

class for NETEDIT geometries over lanes

Definition at line 76 of file GNEGeometry.h.

Constructor & Destructor Documentation

◆ Geometry() [1/3]

GNEGeometry::Geometry::Geometry ( )

constructor

Definition at line 56 of file GNEGeometry.cpp.

◆ Geometry() [2/3]

GNEGeometry::Geometry::Geometry ( const PositionVector shape)

parameter constructor

Definition at line 62 of file GNEGeometry.cpp.

References calculateShapeRotationsAndLengths().

◆ Geometry() [3/3]

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.

Member Function Documentation

◆ calculateShapeRotationsAndLengths()

void GNEGeometry::Geometry::calculateShapeRotationsAndLengths ( )
private

calculate shape rotations and lengths

Definition at line 252 of file GNEGeometry.cpp.

References GNEGeometry::calculateLength(), and GNEGeometry::calculateRotation().

Referenced by Geometry().

Here is the caller graph for this function:

◆ clearGeometry()

void GNEGeometry::Geometry::clearGeometry ( )
private

clear geometry

Definition at line 240 of file GNEGeometry.cpp.

◆ getShape()

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

◆ getShapeLengths()

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

Here is the caller graph for this function:

◆ getShapeRotations()

◆ operator=()

Geometry& GNEGeometry::Geometry::operator= ( const Geometry other)
privatedelete

Invalidated assignment operator.

◆ scaleGeometry()

void GNEGeometry::Geometry::scaleGeometry ( const double  scale)

scale geometry

Definition at line 194 of file GNEGeometry.cpp.

Referenced by GNEPoly::drawGL(), and GNETAZ::drawGL().

Here is the caller graph for this function:

◆ updateGeometry() [1/6]

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

◆ updateGeometry() [2/6]

void GNEGeometry::Geometry::updateGeometry ( const GNEAdditional additional)

update geometry (using geometry of another additional)

Definition at line 174 of file GNEGeometry.cpp.

◆ updateGeometry() [3/6]

void GNEGeometry::Geometry::updateGeometry ( const GNELane lane)

update geometry (using a lane)

Definition at line 165 of file GNEGeometry.cpp.

◆ updateGeometry() [4/6]

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

◆ updateGeometry() [5/6]

void GNEGeometry::Geometry::updateGeometry ( const Position position,
const double  rotation 
)

update position and rotation

Definition at line 135 of file GNEGeometry.cpp.

◆ updateGeometry() [6/6]

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

Parameters
shapeShape to be updated
extremeGeometryExtremeGeometry 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().

Here is the caller graph for this function:

Field Documentation

◆ myAdditional

const GNEAdditional* GNEGeometry::Geometry::myAdditional
private

additional (to use additional geometry)

Definition at line 143 of file GNEGeometry.h.

◆ myLane

const GNELane* GNEGeometry::Geometry::myLane
private

lane (to use lane geometry)

Definition at line 140 of file GNEGeometry.h.

◆ myShape

PositionVector GNEGeometry::Geometry::myShape
private

element shape

Definition at line 131 of file GNEGeometry.h.

◆ myShapeLengths

std::vector<double> GNEGeometry::Geometry::myShapeLengths
private

The lengths of the shape (note: Always size = myShape.size()-1)

Definition at line 137 of file GNEGeometry.h.

◆ myShapeRotations

std::vector<double> GNEGeometry::Geometry::myShapeRotations
private

The rotations of the shape (note: Always size = myShape.size()-1)

Definition at line 134 of file GNEGeometry.h.


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