Eclipse SUMO - Simulation of Urban MObility
GNEGeometry::SegmentGeometry::Segment Struct Reference

struct used for represent segments of element geometry More...

#include <GNEGeometry.h>

Collaboration diagram for GNEGeometry::SegmentGeometry::Segment:

Public Member Functions

const PositionVectorgetShape () const
 get lane/lane2lane shape More...
 
const std::vector< double > & getShapeLengths () const
 get lane/lane2lane shape lengths More...
 
const std::vector< double > & getShapeRotations () const
 get lane/lane2lane shape rotations More...
 
 Segment (const GNEAttributeCarrier *_AC, const GNELane *_lane, const bool _valid)
 parameter constructor for lanes (geometry will be taked from lane) More...
 
 Segment (const GNEAttributeCarrier *_AC, const GNELane *_lane, const PositionVector &shape, const std::vector< double > &shapeRotations, const std::vector< double > &shapeLengths, const bool _valid)
 parameter constructor for segments which geometry will be storaged in segment More...
 
 Segment (const GNEAttributeCarrier *_AC, const GNELane *currentLane, const GNELane *nextLane, const bool _valid)
 parameter constructor for lane2lane connections More...
 
void update (const PositionVector &shape, const std::vector< double > &shapeRotations, const std::vector< double > &shapeLengths)
 update segment More...
 

Data Fields

const GNEAttributeCarrierAC
 element More...
 
const GNEEdgeedge
 edge More...
 
const GNEJunctionjunction
 junction More...
 
const GNELanelane
 lane More...
 
const bool valid
 valid More...
 

Private Member Functions

Segmentoperator= (const Segment &other)=delete
 Invalidated assignment operator. More...
 

Private Attributes

std::vector< double > mySegmentLengths
 segment lengths More...
 
std::vector< double > mySegmentRotations
 segment rotation More...
 
PositionVector mySegmentShape
 segment shape More...
 
bool myUseLane2LaneShape
 flag to use lane2lane connection More...
 
bool myUseLaneShape
 flag to use lane shape More...
 

Detailed Description

struct used for represent segments of element geometry

Definition at line 119 of file GNEGeometry.h.

Constructor & Destructor Documentation

◆ Segment() [1/3]

GNEGeometry::SegmentGeometry::Segment::Segment ( const GNEAttributeCarrier _AC,
const GNELane _lane,
const bool  _valid 
)

parameter constructor for lanes (geometry will be taked from lane)

Definition at line 188 of file GNEGeometry.cpp.

◆ Segment() [2/3]

GNEGeometry::SegmentGeometry::Segment::Segment ( const GNEAttributeCarrier _AC,
const GNELane _lane,
const PositionVector shape,
const std::vector< double > &  shapeRotations,
const std::vector< double > &  shapeLengths,
const bool  _valid 
)

parameter constructor for segments which geometry will be storaged in segment

Definition at line 199 of file GNEGeometry.cpp.

◆ Segment() [3/3]

GNEGeometry::SegmentGeometry::Segment::Segment ( const GNEAttributeCarrier _AC,
const GNELane currentLane,
const GNELane nextLane,
const bool  _valid 
)

parameter constructor for lane2lane connections

Definition at line 214 of file GNEGeometry.cpp.

Member Function Documentation

◆ getShape()

const PositionVector & GNEGeometry::SegmentGeometry::Segment::getShape ( ) const

get lane/lane2lane shape

Definition at line 244 of file GNEGeometry.cpp.

Referenced by GNEDemandElement::calculatePersonPlanPositionStartEndPos(), and GNEGeometry::drawSegmentGeometry().

◆ getShapeLengths()

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

get lane/lane2lane shape lengths

Definition at line 264 of file GNEGeometry.cpp.

Referenced by GNEGeometry::drawSegmentGeometry().

◆ getShapeRotations()

const std::vector< double > & GNEGeometry::SegmentGeometry::Segment::getShapeRotations ( ) const

get lane/lane2lane shape rotations

Definition at line 254 of file GNEGeometry.cpp.

Referenced by GNEGeometry::drawSegmentGeometry().

◆ operator=()

Segment& GNEGeometry::SegmentGeometry::Segment::operator= ( const Segment other)
privatedelete

Invalidated assignment operator.

◆ update()

void GNEGeometry::SegmentGeometry::Segment::update ( const PositionVector shape,
const std::vector< double > &  shapeRotations,
const std::vector< double > &  shapeLengths 
)

update segment

Definition at line 229 of file GNEGeometry.cpp.

Field Documentation

◆ AC

const GNEAttributeCarrier* GNEGeometry::SegmentGeometry::Segment::AC

element

Definition at line 143 of file GNEGeometry.h.

◆ edge

const GNEEdge* GNEGeometry::SegmentGeometry::Segment::edge

edge

Definition at line 146 of file GNEGeometry.h.

Referenced by GNEGeometry::updateGeometricPath().

◆ junction

const GNEJunction* GNEGeometry::SegmentGeometry::Segment::junction

junction

Definition at line 152 of file GNEGeometry.h.

◆ lane

const GNELane* GNEGeometry::SegmentGeometry::Segment::lane

lane

Definition at line 149 of file GNEGeometry.h.

Referenced by GNEGeometry::updateGeometricPath().

◆ mySegmentLengths

std::vector<double> GNEGeometry::SegmentGeometry::Segment::mySegmentLengths
private

segment lengths

Definition at line 171 of file GNEGeometry.h.

◆ mySegmentRotations

std::vector<double> GNEGeometry::SegmentGeometry::Segment::mySegmentRotations
private

segment rotation

Definition at line 168 of file GNEGeometry.h.

◆ mySegmentShape

PositionVector GNEGeometry::SegmentGeometry::Segment::mySegmentShape
private

segment shape

Definition at line 165 of file GNEGeometry.h.

◆ myUseLane2LaneShape

bool GNEGeometry::SegmentGeometry::Segment::myUseLane2LaneShape
private

flag to use lane2lane connection

Definition at line 162 of file GNEGeometry.h.

◆ myUseLaneShape

bool GNEGeometry::SegmentGeometry::Segment::myUseLaneShape
private

flag to use lane shape

Definition at line 159 of file GNEGeometry.h.

◆ valid

const bool GNEGeometry::SegmentGeometry::Segment::valid

valid

Definition at line 155 of file GNEGeometry.h.


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