40 myCachedWidth(new double(0)),
41 myCachedHeight(new double(0)),
42 myCachedRot(new double(0)),
43 myCachedScale(new double(0)),
67 const double scale,
const double lineWidth)
const {
105 const double extrusionWidth,
const double scale,
const bool drawFirstExtrem,
106 const bool drawLastExtrem,
const double lineWidth)
const {
112 scale, drawFirstExtrem, drawLastExtrem, lineWidth);
116 scale, drawFirstExtrem, drawLastExtrem, lineWidth);
120 scale, drawFirstExtrem, drawLastExtrem, lineWidth);
124 scale, drawFirstExtrem, drawLastExtrem, lineWidth);
129 scale, drawFirstExtrem, drawLastExtrem, lineWidth);
134 scale, drawFirstExtrem, drawLastExtrem, lineWidth);
139 scale, drawFirstExtrem, drawLastExtrem, lineWidth);
144 scale, drawFirstExtrem, drawLastExtrem, lineWidth);
152 const double height,
const double offsetX,
const double offsetY,
const double rot,
153 const double scale,
const double lineWidth)
const {
159 width, height, offsetX, offsetY, rot, scale, lineWidth);
163 width, height, offsetX, offsetY, rot, scale, lineWidth);
167 width, height, offsetX, offsetY, rot, scale, lineWidth);
171 width, height, offsetX, offsetY, rot, scale, lineWidth);
176 width, height, offsetX, offsetY, rot, scale, lineWidth);
181 width, height, offsetX, offsetY, rot, scale, lineWidth);
186 width, height, offsetX, offsetY, rot, scale, lineWidth);
191 width, height, offsetX, offsetY, rot, scale, lineWidth);
199 const double scale,
const double lineWidth)
const {
237 const bool drawLastExtrem,
const double lineWidth)
const {
243 drawFirstExtrem, drawLastExtrem, lineWidth);
247 drawFirstExtrem, drawLastExtrem, lineWidth);
251 drawFirstExtrem, drawLastExtrem, lineWidth);
255 drawFirstExtrem, drawLastExtrem, lineWidth);
260 drawFirstExtrem, drawLastExtrem, lineWidth);
265 drawFirstExtrem, drawLastExtrem, lineWidth);
270 drawFirstExtrem, drawLastExtrem, lineWidth);
275 drawFirstExtrem, drawLastExtrem, lineWidth);
283 const PositionVector &shape,
const double scale,
const double lineWidth)
const {
311 const PositionVector &shape,
const double extrusionWidth,
const double scale,
312 const bool drawFirstExtrem,
const bool drawLastExtrem,
const double lineWidth)
const {
355 const Position &pos,
const double width,
const double height,
356 const double offsetX,
const double offsetY,
const double rot,
357 const double scale,
const double lineWidth)
const {
363 rectangleShape.push_back(
Position(0 + width, 0 + height));
364 rectangleShape.push_back(
Position(0 + width, 0 - height));
365 rectangleShape.push_back(
Position(0 - width, 0 - height));
366 rectangleShape.push_back(
Position(0 - width, 0 + height));
368 rectangleShape.
add(offsetX, offsetY, 0);
372 rectangleShape.
add(pos);
398 const Position &pos,
double radius,
const double scale,
const double lineWidth)
const {
423 const GNEEdge* edge,
const bool drawFirstExtrem,
const bool drawLastExtrem,
424 const double lineWidth)
const {
432 drawFirstExtrem, drawLastExtrem, lineWidth);
@ GLO_DOTTEDCONTOUR
dotted contour (used in netedit)
static void popMatrix()
pop matrix
static void pushMatrix()
push matrix
virtual bool checkDrawToContour() const
check if draw from contour (magenta)
virtual bool checkDrawOverContour() const
check if draw over contour (orange)
virtual bool checkDrawRelatedContour() const
check if draw related contour (cyan)
bool checkDrawFrontContour() const
check if draw front contour (green/blue)
virtual bool checkDrawFromContour() const
check if draw from contour (green)
virtual bool checkDrawSelectContour() const =0
check if draw select contour (blue)
bool checkDrawInspectContour() const
check if draw inspect contour (black/white)
virtual bool checkDrawDeleteContour() const =0
check if draw delete contour (pink/white)
double * myCachedScale
pointer to cached scale
void buildAndDrawDottedContourExtruded(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const PositionVector &shape, const double extrusionWidth, const double scale, const bool drawFirstExtrem, const bool drawLastExtrem, const double lineWidth) const
build and draw dotted contour extruded
GNEAttributeCarrier * myAC
pointer to AC
void drawDottedContourEdge(const GUIVisualizationSettings &s, const GNEEdge *edge, const bool drawFirstExtrem, const bool drawLastExtrem, const double lineWidth) const
draw dotted contour edge
PositionVector * myCachedShape
pointer to cached shape
void buildAndDrawDottedContourCircle(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const Position &pos, double radius, const double scale, const double lineWidth) const
draw dotted contour circle
void drawDottedContourExtruded(const GUIVisualizationSettings &s, const PositionVector &shape, const double extrusionWidth, const double scale, const bool drawFirstExtrem, const bool drawLastExtrem, const double lineWidth) const
draw dotted contour extruded (used in elements formed by a central shape)
GUIDottedGeometry::DottedGeometryColor * myDottedGeometryColor
dotted geometry color
GUIDottedGeometry * myDottedGeometryB
pointer to dotted geometry B
void buildAndDrawDottedContourEdge(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const GNEEdge *edge, const bool drawFirstExtrem, const bool drawLastExtrem, const double lineWidth) const
draw dotted contour edge
void buildAndDrawDottedContourClosed(const GUIVisualizationSettings &s, const GUIDottedGeometry::DottedContourType type, const PositionVector &shape, const double scale, const double lineWidth) const
draw dotted contour shape
void drawDottedContourRectangle(const GUIVisualizationSettings &s, const Position &pos, const double width, const double height, const double offsetX, const double offsetY, const double rot, const double scale, const double lineWidth) const
draw dotted contour (for rectangled elements)
double * myCachedRot
pointer to cached rotation
void drawDottedContourCircle(const GUIVisualizationSettings &s, const Position &pos, double radius, const double scale, const double lineWidth) const
draw dotted contour (circle)
void drawDottedContourClosed(const GUIVisualizationSettings &s, const PositionVector &shape, const double scale, const double lineWidth) const
draw dotted contour (for closed shapes)
~GNEContourElement()
destructor
GNEContourElement(GNEAttributeCarrier *AC)
Constructor.
Position * myCachedPosition
pointer to cached position
GUIDottedGeometry * myDottedGeometryC
pointer to dotted geometry C
double * myCachedWidth
pointer to cached width
void buildAndDrawDottedContourRectangle(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const Position &pos, const double width, const double height, const double offsetX, const double offsetY, const double rot, const double scale, const double lineWidth) const
draw dotted contour rectangle
double * myCachedHeight
pointer to cached height
GUIDottedGeometry * myDottedGeometryA
pointer to dotted geometry A
A road/street connecting two junctions (netedit-version)
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
const double exaggeration
exaggeration
const double halfWidth
Draw as a normal lane, and reduce width to make sure that a selected edge can still be seen.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const GUIGeometry & getLaneGeometry() const
get lane geometry
void changeColor()
change color
void reset()
rest Dotted Geometry Color
void drawDottedGeometry(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, DottedGeometryColor *dottedGeometryColor, const double lineWidth) const
draw inspected dottedShape
void moveShapeToSide(const double value)
move shape to side
void invertOffset()
invert offset of all segments
static PositionVector getVertexCircleAroundPosition(const Position &pos, const double width, const int steps=8)
get a circle around the given position
const PositionVector & getShape() const
The shape of the additional element.
Stores the information about how to visualize structures.
bool drawDottedContour(const double exaggeration) const
check if dotted contour can be drawn
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
A point in 2D or 3D with translation and scaling methods.
void append(const PositionVector &v, double sameThreshold=2.0)
void rotate2D(double angle)
void add(double xoff, double yoff, double zoff)
void scaleRelative(double factor)
enlarges/shrinks the polygon by a factor based at the centroid