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

struct for pack all variables related with geometry of elemements divided in segments More...

#include <GNEGeometry.h>

Collaboration diagram for GNEGeometry::SegmentGeometry:

Data Structures

struct  Segment
 struct used for represent segments of element geometry More...
 
struct  SegmentToUpdate
 struct used for represent segments that must be updated More...
 

Public Member Functions

const Segmentback () const
 back segment More...
 
std::vector< Segment >::const_iterator begin () const
 begin iterator More...
 
void clearSegmentGeometry ()
 clear element geometry More...
 
std::vector< Segment >::const_iterator end () const
 end iterator More...
 
const Segmentfront () const
 front segment More...
 
Boundary getBoxBoundary () const
 Returns a boundary enclosing all segments. More...
 
const PositiongetFirstPosition () const
 get first position (or Invalid position if segments are empty) More...
 
double getFirstRotation () const
 get first rotation (or Invalid position if segments are empty) More...
 
const PositiongetLastPosition () const
 get first position (or Invalid position if segments are empty) More...
 
void insertCustomSegment (const GNEAttributeCarrier *AC, const GNELane *lane, const PositionVector &laneShape, const std::vector< double > &laneShapeRotations, const std::vector< double > &laneShapeLengths, const bool valid)
 insert custom segment More...
 
void insertLane2LaneSegment (const GNEAttributeCarrier *AC, const GNELane *currentLane, const GNELane *nextLane, const bool valid)
 insert entire lane2lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths) More...
 
void insertLaneSegment (const GNEAttributeCarrier *AC, const GNELane *lane, const bool valid)
 insert entire lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths) More...
 
 SegmentGeometry ()
 constructor More...
 
int size () const
 number of segments More...
 
void updateCustomSegment (const int segmentIndex, const PositionVector &newLaneShape, const std::vector< double > &newLaneShapeRotations, const std::vector< double > &newLaneShapeLengths)
 update custom segment More...
 
void updateLane2LaneSegment (const int segmentIndex, const GNELane *lane, const GNELane *nextLane)
 update lane2Lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths) More...
 

Private Member Functions

SegmentGeometryoperator= (const SegmentGeometry &other)=delete
 Invalidated assignment operator. More...
 

Private Attributes

std::vector< SegmentmyShapeSegments
 vector of segments that constitutes the shape More...
 

Detailed Description

struct for pack all variables related with geometry of elemements divided in segments

Definition at line 116 of file GNEGeometry.h.

Constructor & Destructor Documentation

◆ SegmentGeometry()

GNEGeometry::SegmentGeometry::SegmentGeometry ( )

constructor

Definition at line 276 of file GNEGeometry.cpp.

Member Function Documentation

◆ back()

const GNEGeometry::SegmentGeometry::Segment & GNEGeometry::SegmentGeometry::back ( ) const

back segment

Definition at line 381 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEDemandElement::calculatePersonPlanPositionStartEndPos().

◆ begin()

std::vector< GNEGeometry::SegmentGeometry::Segment >::const_iterator GNEGeometry::SegmentGeometry::begin ( ) const

begin iterator

Definition at line 363 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEGeometry::updateGeometricPath().

◆ clearSegmentGeometry()

void GNEGeometry::SegmentGeometry::clearSegmentGeometry ( )

clear element geometry

Definition at line 317 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEGeometry::calculateEdgeGeometricPath(), and GNEGeometry::calculateLaneGeometricPath().

◆ end()

std::vector< GNEGeometry::SegmentGeometry::Segment >::const_iterator GNEGeometry::SegmentGeometry::end ( ) const

end iterator

Definition at line 369 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEGeometry::updateGeometricPath().

◆ front()

const GNEGeometry::SegmentGeometry::Segment & GNEGeometry::SegmentGeometry::front ( ) const

front segment

Definition at line 375 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEGeometry::calculateEdgeGeometricPath(), and GNEGeometry::updateGeometricPath().

◆ getBoxBoundary()

Boundary GNEGeometry::SegmentGeometry::getBoxBoundary ( ) const

Returns a boundary enclosing all segments.

Definition at line 353 of file GNEGeometry.cpp.

References Boundary::add(), and myShapeSegments.

Referenced by GNEDetector::getCenteringBoundary().

◆ getFirstPosition()

const Position & GNEGeometry::SegmentGeometry::getFirstPosition ( ) const

get first position (or Invalid position if segments are empty)

Definition at line 324 of file GNEGeometry.cpp.

References Position::INVALID, and myShapeSegments.

Referenced by GNEVehicle::drawGL().

◆ getFirstRotation()

double GNEGeometry::SegmentGeometry::getFirstRotation ( ) const

get first rotation (or Invalid position if segments are empty)

Definition at line 343 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEVehicle::drawGL().

◆ getLastPosition()

const Position & GNEGeometry::SegmentGeometry::getLastPosition ( ) const

get first position (or Invalid position if segments are empty)

Definition at line 333 of file GNEGeometry.cpp.

References Position::INVALID, and myShapeSegments.

Referenced by GNEEdge::drawPartialPersonPlan().

◆ insertCustomSegment()

void GNEGeometry::SegmentGeometry::insertCustomSegment ( const GNEAttributeCarrier AC,
const GNELane lane,
const PositionVector laneShape,
const std::vector< double > &  laneShapeRotations,
const std::vector< double > &  laneShapeLengths,
const bool  valid 
)

insert custom segment

Definition at line 287 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEGeometry::calculateLaneGeometricPath().

◆ insertLane2LaneSegment()

void GNEGeometry::SegmentGeometry::insertLane2LaneSegment ( const GNEAttributeCarrier AC,
const GNELane currentLane,
const GNELane nextLane,
const bool  valid 
)

insert entire lane2lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths)

Definition at line 295 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEGeometry::calculateLaneGeometricPath().

◆ insertLaneSegment()

void GNEGeometry::SegmentGeometry::insertLaneSegment ( const GNEAttributeCarrier AC,
const GNELane lane,
const bool  valid 
)

insert entire lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths)

Definition at line 280 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEGeometry::calculateLaneGeometricPath().

◆ operator=()

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

Invalidated assignment operator.

◆ size()

int GNEGeometry::SegmentGeometry::size ( ) const

◆ updateCustomSegment()

void GNEGeometry::SegmentGeometry::updateCustomSegment ( const int  segmentIndex,
const PositionVector newLaneShape,
const std::vector< double > &  newLaneShapeRotations,
const std::vector< double > &  newLaneShapeLengths 
)

update custom segment

Definition at line 302 of file GNEGeometry.cpp.

References myShapeSegments.

Referenced by GNEGeometry::updateGeometricPath().

◆ updateLane2LaneSegment()

void GNEGeometry::SegmentGeometry::updateLane2LaneSegment ( const int  segmentIndex,
const GNELane lane,
const GNELane nextLane 
)

update lane2Lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths)

Definition at line 308 of file GNEGeometry.cpp.

References GNEGeometry::Lane2laneConnection::connectionsMap, GNELane::getLane2laneConnections(), and myShapeSegments.

Referenced by GNEGeometry::updateGeometricPath().

Field Documentation

◆ myShapeSegments

std::vector<Segment> GNEGeometry::SegmentGeometry::myShapeSegments
private

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