Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEContour.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// class used for show contour elements
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declaration
27// ===========================================================================
28
29class GNENet;
30class GNEEdge;
31class GNESegment;
33
34// ===========================================================================
35// class definitions
36// ===========================================================================
37
39
40public:
42 GNEContour();
43
46
49
51 void clearContour() const;
52
55
58 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
59 const double scale) const;
60
63 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
64 const double extrusionWidth, const double scale, const bool closeFirstExtrem,
65 const bool closeLastExtrem, const double offset, const GNESegment* segment) const;
66
69 const GUIGlObject* glObject, const Position& pos, const double width, const double height,
70 const double layer, const double offsetX, const double offsetY, const double rot,
71 const double scale) const;
72
75 const GUIGlObject* glObject, const Position& pos, double radius, const double layer,
76 const double scale) const;
77
80 const GNEEdge* edge, const GUIGlObject* elementToRegister, const double layer,
81 const bool closeFirstExtrem, const bool closeLastExtrem) const;
82
85 const GNEEdge* fromEdge, const GNEEdge* toEdge) const;
86
89 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
90 const double radius, const double scale) const;
91
94 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
95 const double radius, const double scale) const;
96
99 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
100 const double radius, const double scale) const;
101
104 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
105 const double radius, const double scale, const bool calculatePosOverShape) const;
106
109 const GNEEdge* edge, const double radius, const bool calculatePosOverShape,
110 const bool firstExtrem, const bool lastExtrem) const;
112
115
118 const GNEAttributeCarrier* AC) const;
119
122 const GNEAttributeCarrier* AC, const double lineWidth, const bool addOffset) const;
123
126 const GNEAttributeCarrier* AC, const PositionVector& shape, const double radius,
127 const double scale, const double lineWidth) const;
128
131 const PositionVector& shape, const double scale, const double lineWidth) const;
133
134private:
136 std::vector<GUIDottedGeometry>* myDottedGeometries;
137
140
143
146
149
152 const PositionVector& shape, const double scale) const;
153
156 const PositionVector& shape, const double extrusionWidth, const double scale,
157 const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const;
158
161 const Position& pos, const double width, const double height, const double offsetX,
162 const double offsetY, const double rot, const double scale) const;
163
166 const Position& pos, double radius, const double scale) const;
167
170 const GNEEdge* edge, const bool closeFirstExtrem, const bool closeLastExtrem) const;
171
174 const GNEEdge* fromEdge, const GNEEdge* toEdge) const;
176
179 const double lineWidth, const bool addOffset) const;
180
182 GNEContour(const GNEContour&) = delete;
183
185 GNEContour& operator=(const GNEContour& src) = delete;
186};
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
void calculateContourLastGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale) const
calculate contour for last geometry point
GNEContour()
Constructor.
static GUIDottedGeometry::DottedGeometryColor myDottedGeometryColor
dotted geometry color
Definition GNEContour.h:145
void calculateContourCircleShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, double radius, const double layer, const double scale) const
calculate contour (circle elements)
void buildContourCircle(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, double radius, const double scale) const
build contour aorund circle
void calculateContourRectangleShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, const double width, const double height, const double layer, const double offsetX, const double offsetY, const double rot, const double scale) const
calculate contour (for rectangled elements)
void calculateContourEdges(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
calculate contour between two consecutive edges
void buildContourEdge(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const bool closeFirstExtrem, const bool closeLastExtrem) const
build contour around edge
void buildContourExtrudedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double extrusionWidth, const double scale, const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const
build contour around extruded shape (ej. lane)
void buildContourRectangle(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, const double width, const double height, const double offsetX, const double offsetY, const double rot, const double scale) const
build contour around rectangle
GNEContour(const GNEContour &)=delete
Invalidated copy constructor.
void calculateContourExtrudedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double extrusionWidth, const double scale, const bool closeFirstExtrem, const bool closeLastExtrem, const double offset, const GNESegment *segment) const
calculate contour extruded (used in elements formed by a central shape)
std::vector< GUIDottedGeometry > * myDottedGeometries
dotted geometries
Definition GNEContour.h:136
PositionVector * myCalculatedShape
calculated shape
Definition GNEContour.h:142
void clearContour() const
void clear contour
void drawDottedContourGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const PositionVector &shape, const double radius, const double scale, const double lineWidth) const
draw dotted contour for geometry points
void calculateContourMiddleGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale) const
calculate contour for middle geometry point
void calculateContourFirstGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale) const
calculate contour for first geometry point
void calculateContourClosedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double scale) const
calculate contours
void buildContourEdges(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
build contour between two from-to edgeds
Boundary * myContourBoundary
contourboundary
Definition GNEContour.h:139
void calculateContourEdgeGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const double radius, const bool calculatePosOverShape, const bool firstExtrem, const bool lastExtrem) const
calculate contour for edge geometry points
void calculateContourEdge(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const GUIGlObject *elementToRegister, const double layer, const bool closeFirstExtrem, const bool closeLastExtrem) const
calculate contour edge
void drawInnenContourClosed(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double scale, const double lineWidth) const
draw innen contour (currently used only in walkingAreas)
void drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
draw dotted contours (basics, select, delete, inspect...)
Boundary getContourBoundary() const
get contour boundary
GNEContour & operator=(const GNEContour &src)=delete
Invalidated assignment operator.
~GNEContour()
destructor
void buildContourClosedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double scale) const
build contour around closed shape (ej. polygon)
void calculateContourAllGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale, const bool calculatePosOverShape) const
calculate contour for all geometry points
void drawDottedContour(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const double lineWidth, const bool addOffset) const
draw dotted contour
bool checkDrawPathContour(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC) const
drawing contour functions
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
class for pack all variables related with GUIDottedGeometry color
Stores the information about how to visualize structures.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.