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

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

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