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

struct for pack all variables related with geometry of stop More...

#include <GNEGeometry.h>

Collaboration diagram for GNEGeometry::Geometry:

Public Member Functions

 Geometry ()
 constructor More...
 
const PositiongetPosition () const
 get Position More...
 
double getRotation () const
 get rotation 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 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...
 
Geometryoperator= (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...
 

Detailed Description

struct for pack all variables related with geometry of stop

Definition at line 56 of file GNEGeometry.h.

Constructor & Destructor Documentation

◆ Geometry()

GNEGeometry::Geometry::Geometry ( )

constructor

Definition at line 41 of file GNEGeometry.cpp.

Member Function Documentation

◆ calculateShapeRotationsAndLengths()

void GNEGeometry::Geometry::calculateShapeRotationsAndLengths ( )
private

calculate shape rotations and lengths

Definition at line 165 of file GNEGeometry.cpp.

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

◆ getPosition()

◆ getRotation()

double GNEGeometry::Geometry::getRotation ( ) const

◆ getShape()

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(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorE1Instant::drawGL(), GNEDetectorE2::drawGL(), GNEDetectorEntryExit::drawGL(), GNEParkingArea::drawGL(), GNEStop::drawGL(), GNEConnection::drawGL(), GNECrossing::drawGL(), GNEInternalLane::drawGL(), GNELane::drawGL(), GNELane::drawLane2LaneConnections(), GNELane::drawLinkNo(), GNELane::drawMarkings(), GNELane::drawTLSLinkNo(), GNEConnection::getBoundary(), GNEAccess::getCenteringBoundary(), GNEBusStop::getCenteringBoundary(), GNECalibrator::getCenteringBoundary(), GNEChargingStation::getCenteringBoundary(), GNEContainerStop::getCenteringBoundary(), GNEDetector::getCenteringBoundary(), GNEParkingArea::getCenteringBoundary(), GNERouteProbe::getCenteringBoundary(), GNEVaporizer::getCenteringBoundary(), GNEStop::getCenteringBoundary(), GNEInternalLane::getCenteringBoundary(), GNELane::getColorValue(), GNEConnection::getConnectionShape(), GNELane::getLaneShapeLength(), GNEAdditional::getPopUpMenu(), GNELane::getPopUpMenu(), GNELane::setFunctionalColor(), GNELane::setMultiColor(), GNEGeometry::updateGeometricPath(), GNEAccess::updateGeometry(), GNEBusStop::updateGeometry(), GNEChargingStation::updateGeometry(), GNEContainerStop::updateGeometry(), GNEDetectorE1::updateGeometry(), GNEDetectorE1Instant::updateGeometry(), GNEDetectorE2::updateGeometry(), GNEDetectorEntryExit::updateGeometry(), GNEParkingArea::updateGeometry(), GNERouteProbe::updateGeometry(), GNEVaporizer::updateGeometry(), GNELane::updateGeometry(), and updateGeometry().

◆ getShapeLengths()

◆ getShapeRotations()

◆ operator=()

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

Invalidated assignment operator.

◆ updateGeometry()

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

◆ updateGeometryPosition()

◆ updateGeometryShape()

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

Parameters
startPosif is different of -1, then shape will be cut in these first position
endPosif is different of -1, then shape will be cut in these last position
extraFirstPositionif is different of Position::INVALID, add it in shape front position (after cut)
extraLastPositionif is different of Position::INVALID, add it in shape last position (after cut)
Note
lengths and rotations wil be updated

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(), GNEDetectorE2::updateGeometry(), GNEStop::updateGeometry(), GNEConnection::updateGeometry(), GNECrossing::updateGeometry(), GNELane::updateGeometry(), and GNEStop::updatePartialGeometry().

Field Documentation

◆ myPosition

Position GNEGeometry::Geometry::myPosition
private

get single position

Definition at line 97 of file GNEGeometry.h.

◆ myRotation

double GNEGeometry::Geometry::myRotation
private

get single rotation

Definition at line 100 of file GNEGeometry.h.

◆ myShape

PositionVector GNEGeometry::Geometry::myShape
private

element shape

Definition at line 103 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 109 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 106 of file GNEGeometry.h.


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