86 myAdditionalElement(nullptr),
87 myDemandElement(demandElement),
88 myGenericData(nullptr) {
93 myAdditionalElement(nullptr),
94 myDemandElement(nullptr),
95 myGenericData(genericData) {
102 const std::vector<GNEPathElements::PathElement>&
113 if (pathElement.getLane() == lane) {
121 if (pathElement.getLane() == lane) {
129 if (pathElement.getLane() == lane) {
142 if (pathElement.getJunction() == junction) {
150 if (pathElement.getJunction() == junction) {
158 if (pathElement.getJunction() == junction) {
172 if (fromLane && toLane) {
182 if (path.size() > 0) {
183 for (
int i = 0; i < (int)path.size(); i++) {
186 }
else if (i == (
int)path.size()) {
188 }
else if (allowedVClass) {
189 myPathElements.push_back(path.at(i)->getLaneByAllowedVClass(vClass));
191 myPathElements.push_back(path.at(i)->getLaneByDisallowedVClass(vClass));
212 for (
const auto& edge : edges) {
216 myPathElements.push_back(edge->getLaneByDisallowedVClass(vClass));
233 for (
const auto& lane : lanes) {
246 if (fromLane && toLane) {
254 if (edges.size() > 0) {
255 for (
int i = 0; i < (int)edges.size(); i++) {
258 }
else if (i == (
int)edges.size()) {
260 }
else if (allowedVClass) {
261 myPathElements.push_back(edges.at(i)->getLaneByAllowedVClass(vClass));
263 myPathElements.push_back(edges.at(i)->getLaneByDisallowedVClass(vClass));
286 for (
const auto& edge : edges) {
287 for (
const auto& lane : edge->getLanes()) {
306 if (pathElement.getJunction()) {
316 if (pathElement.getJunction()) {
326 if (pathElement.getJunction()) {
327 pathElement.getJunction()->addPathGenericData(
myGenericData);
341 if (pathElement.getJunction()) {
351 if (pathElement.getJunction()) {
361 if (pathElement.getJunction()) {
362 pathElement.getJunction()->removePathGenericData(
myGenericData);
373 i->updateNextLane((i + 1)->getLane());
378 const std::vector<GNEEdge*>
381 std::vector<GNEEdge*> edges;
384 for (
const auto& edge : viaEdges) {
385 edges.push_back(edge);
389 edges.erase(std::unique(edges.begin(), edges.end()), edges.end());
396 myAdditionalElement(nullptr),
397 myDemandElement(nullptr),
398 myGenericData(nullptr) {
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
An Element which don't belongs to GNENet but has influency in the simulation.
void drawPartialGL(const GUIVisualizationSettings &s, const GNELane *lane, const double offsetFront) const
Draws partial object (lane)
GNENet * getNet() const
get pointer to net
An Element which don't belongs to GNENet but has influency in the simulation.
virtual void drawPartialGL(const GUIVisualizationSettings &s, const GNELane *lane, const double offsetFront) const =0
Draws partial object (lane)
An Element which don't belongs to GNENet but has influency in the simulation.
virtual bool isGenericDataVisible() const =0
check if current generic data is visible
virtual void drawPartialGL(const GUIVisualizationSettings &s, const GNELane *lane, const double offsetFront) const =0
Draws partial object (lane)
const std::vector< GNEJunction * > & getParentJunctions() const
get parent junctions
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GNEEdge * getParentEdge() const
get arent edge
std::vector< GNEEdge * > calculatePath(const SUMOVehicleClass vClass, const std::vector< GNEEdge * > &partialEdges) const
calculate Dijkstra path between a list of partial edges
GNENetHelper::PathCalculator * getPathCalculator()
obtain instance of PathCalculator
GNEJunction * getJunction() const
get junction
PathElement()
default constructor
GNELane * getNextLane() const
get next lane
void updateNextLane(GNELane *lane)
update nextLane
GNELane * getLane() const
get lane
void calculatePathLanes(SUMOVehicleClass vClass, const bool allowedVClass, GNELane *fromLane, GNELane *toLane, const std::vector< GNEEdge * > &viaEdges)
calculate path lanes (Dijkstra)
GNEGenericData * myGenericData
pointer to generic data
void updatePathElements()
update path element
void calculateGenericDataLanePath(const std::vector< GNEEdge * > &edges)
calculate consecutive path lanes (used by genericdatas)
GNEAdditional * myAdditionalElement
pointer to additional element
void removeElements()
remove elements
void drawJunctionPathChildren(const GUIVisualizationSettings &s, const GNEJunction *junction, const double offset) const
draw junction path child
void calculateConsecutivePathLanes(SUMOVehicleClass vClass, const bool allowedVClass, const std::vector< GNEEdge * > &edges)
calculate consecutive path lanes (used by routes)
GNEPathElements()
default constructor
const std::vector< GNEPathElements::PathElement > & getPath() const
get path edges
void drawLanePathChildren(const GUIVisualizationSettings &s, const GNELane *lane, const double offset) const
draw lane path child
~GNEPathElements()
Destructor.
void addElements()
add elements
GNEDemandElement * myDemandElement
pointer to demand element
void resetPathLanes(SUMOVehicleClass vClass, const bool allowedVClass, GNELane *fromLane, GNELane *toLane, const std::vector< GNEEdge * > &viaEdges)
reset path lanes
const std::vector< GNEEdge * > calculateFromViaToEdges(GNELane *fromLane, GNELane *toLane, const std::vector< GNEEdge * > &viaEdges)
calculate from-via-to edges
std::vector< PathElement > myPathElements
vector of edges used in paths
Stores the information about how to visualize structures.