Eclipse SUMO - Simulation of Urban MObility
GNEDemandElement::DemandElementSegmentGeometry Struct Reference

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

#include <GNEDemandElement.h>

Collaboration diagram for GNEDemandElement::DemandElementSegmentGeometry:

Data Structures

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

Public Member Functions

std::vector< Segment >::const_iterator begin () const
 begin iterator More...
 
void calculatePartialShapeRotationsAndLengths ()
 calculate partial shape, rotations and lengths More...
 
void clearDemandElementSegmentGeometry ()
 clear demand element geometry More...
 
 DemandElementSegmentGeometry ()
 constructor More...
 
std::vector< Segment >::const_iterator end () const
 end iterator More...
 
void insertEdgeLengthRotSegment (const GNEDemandElement *element, const GNEEdge *edge, const Position pos, double length, double rotation, const bool visible, const bool valid)
 insert edge segment with length and rotation (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths) More...
 
void insertEdgeSegment (const GNEDemandElement *element, const GNEEdge *edge, const Position pos, const bool visible, const bool valid)
 insert edge segment More...
 
void insertJunctionSegment (const GNEDemandElement *element, const GNEJunction *junction, const Position pos, const bool visible, const bool valid)
 insert junction segment More...
 

Data Fields

bool geometryDeprecated
 mark geometry as deprecated (used to avoid multiple updates) 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 80 of file GNEDemandElement.h.

Constructor & Destructor Documentation

◆ DemandElementSegmentGeometry()

GNEDemandElement::DemandElementSegmentGeometry::DemandElementSegmentGeometry ( )

constructor

Definition at line 127 of file GNEDemandElement.cpp.

Member Function Documentation

◆ begin()

std::vector< GNEDemandElement::DemandElementSegmentGeometry::Segment >::const_iterator GNEDemandElement::DemandElementSegmentGeometry::begin ( ) const

begin iterator

Definition at line 185 of file GNEDemandElement.cpp.

Referenced by GNEVehicle::drawGL(), GNEEdge::drawPartialRoute(), and GNEEdge::drawPartialTripFromTo().

◆ calculatePartialShapeRotationsAndLengths()

void GNEDemandElement::DemandElementSegmentGeometry::calculatePartialShapeRotationsAndLengths ( )

calculate partial shape, rotations and lengths

Definition at line 161 of file GNEDemandElement.cpp.

References Position::distanceTo2D(), M_PI, Position::x(), and Position::y().

Referenced by GNERoute::updateGeometry(), GNEPerson::updateGeometry(), and GNEVehicle::updateGeometry().

◆ clearDemandElementSegmentGeometry()

void GNEDemandElement::DemandElementSegmentGeometry::clearDemandElementSegmentGeometry ( )

clear demand element geometry

Definition at line 154 of file GNEDemandElement.cpp.

Referenced by GNERoute::updateGeometry(), GNEPerson::updateGeometry(), and GNEVehicle::updateGeometry().

◆ end()

std::vector< GNEDemandElement::DemandElementSegmentGeometry::Segment >::const_iterator GNEDemandElement::DemandElementSegmentGeometry::end ( ) const

end iterator

Definition at line 191 of file GNEDemandElement.cpp.

Referenced by GNEEdge::drawPartialRoute(), and GNEEdge::drawPartialTripFromTo().

◆ insertEdgeLengthRotSegment()

void GNEDemandElement::DemandElementSegmentGeometry::insertEdgeLengthRotSegment ( const GNEDemandElement element,
const GNEEdge edge,
const Position  pos,
double  length,
double  rotation,
const bool  visible,
const bool  valid 
)

insert edge segment with length and rotation (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndLengths)

Definition at line 140 of file GNEDemandElement.cpp.

Referenced by GNERoute::updateGeometry(), GNEPerson::updateGeometry(), and GNEVehicle::updateGeometry().

◆ insertEdgeSegment()

void GNEDemandElement::DemandElementSegmentGeometry::insertEdgeSegment ( const GNEDemandElement element,
const GNEEdge edge,
const Position  pos,
const bool  visible,
const bool  valid 
)

insert edge segment

Definition at line 133 of file GNEDemandElement.cpp.

Referenced by GNERoute::updateGeometry(), GNEPerson::updateGeometry(), and GNEVehicle::updateGeometry().

◆ insertJunctionSegment()

void GNEDemandElement::DemandElementSegmentGeometry::insertJunctionSegment ( const GNEDemandElement element,
const GNEJunction junction,
const Position  pos,
const bool  visible,
const bool  valid 
)

Field Documentation

◆ geometryDeprecated

bool GNEDemandElement::DemandElementSegmentGeometry::geometryDeprecated

◆ myShapeSegments

std::vector<Segment> GNEDemandElement::DemandElementSegmentGeometry::myShapeSegments
private

vector of segments that constitutes the shape

Definition at line 151 of file GNEDemandElement.h.


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