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 GUIGlObject* boundaryParent,
60 const bool addToSelectedObjects = true) const;
61
64 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
65 const double extrusionWidth, const double scale, const bool closeFirstExtrem,
66 const bool closeLastExtrem, const double offset, const GNESegment* segment,
67 const GUIGlObject* boundaryParent, const bool addToSelectedObjects = true) const;
68
71 const GUIGlObject* glObject, const Position& pos, const double width, const double height,
72 const double layer, const double offsetX, const double offsetY, const double rot,
73 const double scale, const GUIGlObject* boundaryParent) const;
74
77 const GUIGlObject* glObject, const Position& pos, double radius, const double layer,
78 const double scale, const GUIGlObject* boundaryParent) const;
79
82 const GNEEdge* edge, const GUIGlObject* elementToRegister, const double layer,
83 const bool closeFirstExtrem, const bool closeLastExtrem) const;
84
87 const GNEEdge* fromEdge, const GNEEdge* toEdge) const;
88
91 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
92 const double radius, const double scale) const;
93
96 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
97 const double radius, const double scale) const;
98
101 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
102 const double radius, const double scale) const;
103
106 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
107 const double radius, const double scale, const bool calculatePosOverShape) const;
108
111 const GNEEdge* edge, const double radius, const bool calculatePosOverShape,
112 const bool firstExtrem, const bool lastExtrem) const;
114
117
120 const GNEAttributeCarrier* AC) const;
121
124 const GNEAttributeCarrier* AC, const double lineWidth, const bool addOffset) const;
125
128 const GNEAttributeCarrier* AC, const PositionVector& shape, const double radius,
129 const double scale, const double lineWidth) const;
130
133 const PositionVector& shape, const double scale, const double lineWidth) const;
134
137 const double lineWidth, const bool addOffset) const;
139
140private:
142 std::vector<GUIDottedGeometry>* myDottedGeometries;
143
146
149
152
155
158 const PositionVector& shape, const double scale) const;
159
162 const PositionVector& shape, const double extrusionWidth, const double scale,
163 const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const;
164
167 const Position& pos, const double width, const double height, const double offsetX,
168 const double offsetY, const double rot, const double scale) const;
169
172 const Position& pos, double radius, const double scale) const;
173
176 const GNEEdge* edge, const bool closeFirstExtrem, const bool closeLastExtrem) const;
177
180 const GNEEdge* fromEdge, const GNEEdge* toEdge) const;
182
184 GNEContour(const GNEContour&) = delete;
185
187 GNEContour& operator=(const GNEContour& src) = delete;
188};
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:151
void buildContourCircle(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, double radius, const double scale) const
build contour aorund circle
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 GUIGlObject *boundaryParent, const bool addToSelectedObjects=true) const
calculate contour extruded (used in elements formed by a central shape)
std::vector< GUIDottedGeometry > * myDottedGeometries
dotted geometries
Definition GNEContour.h:142
PositionVector * myCalculatedShape
calculated shape
Definition GNEContour.h:148
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
bool drawDottedContour(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const double lineWidth, const bool addOffset) const
draw dotted contour (call out of this class only in special cases, for example in WalkingAreas)
void calculateContourCircleShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, double radius, const double layer, const double scale, const GUIGlObject *boundaryParent) const
calculate contour (circle elements)
void calculateContourClosedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double scale, const GUIGlObject *boundaryParent, const bool addToSelectedObjects=true) 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:145
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)
Boundary getContourBoundary() const
get contour boundary
GNEContour & operator=(const GNEContour &src)=delete
Invalidated assignment operator.
~GNEContour()
destructor
bool 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...)
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 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 GUIGlObject *boundaryParent) const
calculate contour (for rectangled elements)
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.