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 ()
 default 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 PositionVector &shape)
 update entire geometry More...
 
void updateGeometry (const PositionVector &shape, const double posOverShape, const double lateralOffset)
 update geometry (using a shape, a position over shape and a lateral offset) More...
 
void updateGeometry (const PositionVector &shape, double beginTrimPosition, double endTrimPosition, const Position &extraFirstPosition, const Position &extraLastPosition)
 update geometry shape More...
 
void updateGeometry (const PositionVector &shape, double starPosOverShape, double endPosOverShape, const double lateralOffset)
 update geometry (using a shape, a starPos over shape, a endPos and a lateral offset) More...
 
void updateSinglePosGeometry (const Position &position, const double rotation)
 update position and rotation More...
 

Protected Member Functions

void calculateShapeRotationsAndLengths ()
 calculate shape rotations and lengths More...
 
void clearGeometry ()
 clear geometry More...
 

Protected Attributes

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 56 of file GNEGeometry.h.

Constructor & Destructor Documentation

◆ Geometry() [1/3]

GNEGeometry::Geometry::Geometry ( )

default constructor

Definition at line 45 of file GNEGeometry.cpp.

◆ Geometry() [2/3]

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

parameter constructor

Definition at line 49 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 56 of file GNEGeometry.cpp.

Member Function Documentation

◆ calculateShapeRotationsAndLengths()

void GNEGeometry::Geometry::calculateShapeRotationsAndLengths ( )
protected

calculate shape rotations and lengths

Definition at line 225 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 ( )
protected

clear geometry

Definition at line 216 of file GNEGeometry.cpp.

◆ getShape()

const PositionVector & GNEGeometry::Geometry::getShape ( ) const

The shape of the additional element.

Definition at line 199 of file GNEGeometry.cpp.

Referenced by GNEAdditional::drawAdditionalID(), GNEAdditional::drawAdditionalName(), GNELane::drawArrows(), GNEGeometry::drawContourGeometry(), GNEDetector::drawDetectorLogo(), GNELane::drawDirectionIndicators(), GNETAZ::drawDottedContours(), GNEDetector::drawE1Shape(), GNEGeometry::drawGeometry(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEDetectorE1::drawGL(), GNEParkingArea::drawGL(), GNEDetectorEntryExit::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), GNEVaporizer::drawGL(), GNERouteProbe::drawGL(), GNEDetectorE1Instant::drawGL(), GNEParkingSpace::drawGL(), GNEAccess::drawGL(), GNETAZRelData::drawGL(), GNEDetectorE2::drawGL(), GNECrossing::drawGL(), GNEInternalLane::drawGL(), GNEStopContainer::drawGL(), GNEStopPerson::drawGL(), GNEStop::drawGL(), GNECalibrator::drawGL(), GNETAZ::drawGL(), GNEConnection::drawGL(), GNEPoly::drawGL(), GNELane::drawGL(), GNEVehicle::drawGL(), GNELane::drawLane2LaneConnections(), GNELane::drawLaneAsRailway(), GNEStoppingPlace::drawLines(), GNELane::drawLinkNo(), GNELane::drawMarkings(), GNEEdgeRelData::drawPartialGL(), GNERoute::drawPartialGL(), GNEAdditional::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartial(), GNEStoppingPlace::drawSign(), GNEStopContainer::drawStopContainerOverLane(), GNEStopContainer::drawStopContainerOverStopContainer(), GNEStopPerson::drawStopPersonOverBusStop(), GNEStopPerson::drawStopPersonOverLane(), GNEAdditionalFrame::E2MultilaneLaneSelector::drawTemporalE2Multilane(), GNEFrameModuls::PathCreator::drawTemporalRoute(), GNELane::drawTLSLinkNo(), GNEStop::getCenteringBoundary(), GNETAZRelData::getCenteringBoundary(), GNEVehicle::getCenteringBoundary(), GNELane::getColorValue(), GNEConnection::getConnectionShape(), GNELane::getLaneShapeLength(), GNEConnection::getMoveOperation(), GNEDemandElement::getPathElementArrivalPos(), GNEDemandElement::getPathElementDepartPos(), GNELane::getPopUpMenu(), GNEAdditional::getPopUpMenu(), GNERerouterSymbol::getPositionInView(), GNEVariableSpeedSignSymbol::getPositionInView(), GNEVaporizer::getPositionInView(), GNERouteProbe::getPositionInView(), GNEAccess::getPositionInView(), GNEStoppingPlace::getPositionInView(), GNECalibrator::getPositionInView(), GNEDetector::getPositionInView(), GNEVehicle::getPositionInView(), GNENetHelper::AttributeCarriers::isNetworkElementAroundShape(), GNELane::setFunctionalColor(), GNELane::setMultiColor(), GNEDetectorE3::updateCenteringBoundary(), GNEVariableSpeedSign::updateCenteringBoundary(), GNERerouter::updateCenteringBoundary(), GNEStoppingPlace::updateCenteringBoundary(), GNEInternalLane::updateCenteringBoundary(), GNEConnection::updateCenteringBoundary(), GNEChargingStation::updateGeometry(), GNEContainerStop::updateGeometry(), GNEBusStop::updateGeometry(), GNEParkingArea::updateGeometry(), and GNELane::updateGeometry().

◆ getShapeLengths()

const std::vector< double > & GNEGeometry::Geometry::getShapeLengths ( ) const

The lengths of the single shape parts.

Definition at line 211 of file GNEGeometry.cpp.

Referenced by GNELane::drawDirectionIndicators(), GNEGeometry::drawGeometry(), GNECrossing::drawGL(), GNEStop::drawGL(), GNEConnection::drawGL(), GNELane::drawGL(), GNELane::drawLaneAsRailway(), GNELane::drawMarkings(), and GNELane::getShapeLengths().

Here is the caller graph for this function:

◆ getShapeRotations()

◆ scaleGeometry()

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

scale geometry

Definition at line 188 of file GNEGeometry.cpp.

◆ updateGeometry() [1/4]

◆ updateGeometry() [2/4]

void GNEGeometry::Geometry::updateGeometry ( const PositionVector shape,
const double  posOverShape,
const double  lateralOffset 
)

update geometry (using a shape, a position over shape and a lateral offset)

Definition at line 75 of file GNEGeometry.cpp.

References PositionVector::length(), PositionVector::positionAtOffset(), and PositionVector::rotationDegreeAtOffset().

◆ updateGeometry() [3/4]

void GNEGeometry::Geometry::updateGeometry ( const PositionVector shape,
double  beginTrimPosition,
double  endTrimPosition,
const Position extraFirstPosition,
const Position extraLastPosition 
)

update geometry shape

Parameters
shapeShape to be updated

Definition at line 132 of file GNEGeometry.cpp.

References Position::INVALID, PositionVector::length2D(), and POSITION_EPS.

◆ updateGeometry() [4/4]

void GNEGeometry::Geometry::updateGeometry ( const PositionVector shape,
double  starPosOverShape,
double  endPosOverShape,
const double  lateralOffset 
)

update geometry (using a shape, a starPos over shape, a endPos and a lateral offset)

Definition at line 95 of file GNEGeometry.cpp.

References PositionVector::move2side(), and POSITION_EPS.

◆ updateSinglePosGeometry()

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

update position and rotation

Definition at line 178 of file GNEGeometry.cpp.

Referenced by GNEDetectorE3::updateGeometry(), GNEVariableSpeedSign::updateGeometry(), and GNERerouter::updateGeometry().

Here is the caller graph for this function:

Field Documentation

◆ myShape

PositionVector GNEGeometry::Geometry::myShape
protected

element shape

Definition at line 106 of file GNEGeometry.h.

◆ myShapeLengths

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

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

Definition at line 112 of file GNEGeometry.h.

◆ myShapeRotations

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

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

Definition at line 109 of file GNEGeometry.h.


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