Eclipse SUMO - Simulation of Urban MObility
GUIDottedGeometry Class Reference

#include <GUIDottedGeometry.h>

Data Structures

class  DottedGeometryColor
 class for pack all variables related with GUIDottedGeometry color More...
 
struct  Segment
 dotted geometry segment More...
 

Public Types

enum class  DottedContourType {
  INSPECT , INSPECT_SMALL , REMOVE , SELECT ,
  FRONT , FRONT_SMALL , MOVE , GREEN ,
  MAGENTA , ORANGE , YELLOW , FROMTAZ ,
  TOTAZ , NOTHING
}
 

Public Member Functions

void drawDottedGeometry (const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, DottedGeometryColor &dottedGeometryColor, const double customWidth=1) const
 draw inspected dottedShape More...
 
 GUIDottedGeometry ()
 constructor More...
 
 GUIDottedGeometry (const GUIVisualizationSettings &s, const GUIDottedGeometry &topDottedGeometry, const bool drawFirstExtrem, const GUIDottedGeometry &botDottedGeometry, const bool drawLastExtrem)
 constructor for extremes More...
 
 GUIDottedGeometry (const GUIVisualizationSettings &s, PositionVector shape, const bool closeShape)
 constructor for shapes More...
 
void invertOffset ()
 invert offset of all segments More...
 
void moveShapeToSide (const double value)
 move shape to side More...
 
void updateDottedGeometry (const GUIVisualizationSettings &s, const PositionVector &laneShape)
 update GUIDottedGeometry (using lane shape) More...
 
void updateDottedGeometry (const GUIVisualizationSettings &s, PositionVector shape, const bool closeShape)
 update GUIDottedGeometry (using shape) More...
 

Static Public Member Functions

draw functions
static void drawDottedContourClosedShape (const GUIVisualizationSettings &s, const DottedContourType type, const PositionVector &shape, const double exaggeration, const double customWidth=1)
 draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs) More...
 
static void drawDottedContourShape (const GUIVisualizationSettings &s, const DottedContourType type, const PositionVector &shape, const double width, const double exaggeration, const bool drawFirstExtrem, const bool drawLastExtrem)
 draw dotted contour for the given shape (used by additionals) More...
 
static void drawDottedContourCircle (const GUIVisualizationSettings &s, const DottedContourType type, const Position &pos, const double radius, const double exaggeration)
 draw dotted contour for the given Position and radius (used by Juctions and POIs) More...
 
static void drawDottedSquaredShape (const GUIVisualizationSettings &s, const DottedContourType type, const Position &pos, const double width, const double height, const double offsetX, const double offsetY, const double rot, const double exaggeration)
 draw dotted squared contour (used by additionals and demand elements) More...
 

Private Member Functions

void calculateShapeRotationsAndLengths ()
 calculate shape rotations and lengths More...
 

Private Attributes

std::vector< GUIDottedGeometry::SegmentmyDottedGeometrySegments
 dotted element shape (note: It's centered in 0,0 due scaling) More...
 

Detailed Description

Definition at line 30 of file GUIDottedGeometry.h.

Member Enumeration Documentation

◆ DottedContourType

Enumerator
INSPECT 
INSPECT_SMALL 
REMOVE 
SELECT 
FRONT 
FRONT_SMALL 
MOVE 
GREEN 
MAGENTA 
ORANGE 
YELLOW 
FROMTAZ 
TOTAZ 
NOTHING 

Definition at line 34 of file GUIDottedGeometry.h.

Constructor & Destructor Documentation

◆ GUIDottedGeometry() [1/3]

GUIDottedGeometry::GUIDottedGeometry ( )

constructor

Definition at line 154 of file GUIDottedGeometry.cpp.

◆ GUIDottedGeometry() [2/3]

◆ GUIDottedGeometry() [3/3]

GUIDottedGeometry::GUIDottedGeometry ( const GUIVisualizationSettings s,
const GUIDottedGeometry topDottedGeometry,
const bool  drawFirstExtrem,
const GUIDottedGeometry botDottedGeometry,
const bool  drawLastExtrem 
)

Member Function Documentation

◆ calculateShapeRotationsAndLengths()

void GUIDottedGeometry::calculateShapeRotationsAndLengths ( )
private

calculate shape rotations and lengths

Definition at line 421 of file GUIDottedGeometry.cpp.

References GUIGeometry::calculateLength(), GUIGeometry::calculateRotation(), and myDottedGeometrySegments.

Referenced by GUIDottedGeometry(), and updateDottedGeometry().

Here is the caller graph for this function:

◆ drawDottedContourCircle()

void GUIDottedGeometry::drawDottedContourCircle ( const GUIVisualizationSettings s,
const DottedContourType  type,
const Position pos,
const double  radius,
const double  exaggeration 
)
static

draw dotted contour for the given Position and radius (used by Juctions and POIs)

Definition at line 386 of file GUIDottedGeometry.cpp.

References drawDottedContourClosedShape(), and GUIGeometry::getVertexCircleAroundPosition().

Referenced by GNEJunction::drawDottedContours(), GNEAccess::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), and GNEPOI::drawGL().

Here is the caller graph for this function:

◆ drawDottedContourClosedShape()

void GUIDottedGeometry::drawDottedContourClosedShape ( const GUIVisualizationSettings s,
const DottedContourType  type,
const PositionVector shape,
const double  exaggeration,
const double  customWidth = 1 
)
static

draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs)

Definition at line 311 of file GUIDottedGeometry.cpp.

References GUIVisualizationSettings::drawDottedContour(), drawDottedGeometry(), FRONT, GLO_DOTTEDCONTOUR_INSPECTED, GLHelper::popMatrix(), GLHelper::pushMatrix(), and PositionVector::scaleRelative().

Referenced by drawDottedContourCircle(), GNEJunction::drawDottedContours(), GNETAZ::drawDottedContours(), drawDottedSquaredShape(), GNEWalkingArea::drawGL(), and GNEPoly::drawGL().

Here is the caller graph for this function:

◆ drawDottedContourShape()

void GUIDottedGeometry::drawDottedContourShape ( const GUIVisualizationSettings s,
const DottedContourType  type,
const PositionVector shape,
const double  width,
const double  exaggeration,
const bool  drawFirstExtrem,
const bool  drawLastExtrem 
)
static

◆ drawDottedGeometry()

void GUIDottedGeometry::drawDottedGeometry ( const GUIVisualizationSettings s,
GUIDottedGeometry::DottedContourType  type,
DottedGeometryColor dottedGeometryColor,
const double  customWidth = 1 
) const

◆ drawDottedSquaredShape()

void GUIDottedGeometry::drawDottedSquaredShape ( const GUIVisualizationSettings s,
const DottedContourType  type,
const Position pos,
const double  width,
const double  height,
const double  offsetX,
const double  offsetY,
const double  rot,
const double  exaggeration 
)
static

◆ invertOffset()

void GUIDottedGeometry::invertOffset ( )

invert offset of all segments

Definition at line 302 of file GUIDottedGeometry.cpp.

References myDottedGeometrySegments.

Referenced by GNEEdge::drawDottedContourEdge(), drawDottedContourShape(), and GNEEdgeRelData::drawPartialGL().

Here is the caller graph for this function:

◆ moveShapeToSide()

void GUIDottedGeometry::moveShapeToSide ( const double  value)

move shape to side

Definition at line 293 of file GUIDottedGeometry.cpp.

References myDottedGeometrySegments.

Referenced by GNEEdge::drawDottedContourEdge(), drawDottedContourShape(), and GNEEdgeRelData::drawPartialGL().

Here is the caller graph for this function:

◆ updateDottedGeometry() [1/2]

void GUIDottedGeometry::updateDottedGeometry ( const GUIVisualizationSettings s,
const PositionVector laneShape 
)

◆ updateDottedGeometry() [2/2]

Field Documentation

◆ myDottedGeometrySegments

std::vector<GUIDottedGeometry::Segment> GUIDottedGeometry::myDottedGeometrySegments
private

dotted element shape (note: It's centered in 0,0 due scaling)

Definition at line 152 of file GUIDottedGeometry.h.

Referenced by calculateShapeRotationsAndLengths(), drawDottedGeometry(), GUIDottedGeometry(), invertOffset(), moveShapeToSide(), and updateDottedGeometry().


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