Eclipse SUMO - Simulation of Urban MObility
GNEGeometry Struct Reference

#include <GNEGeometry.h>

Collaboration diagram for GNEGeometry:

Data Structures

class  DottedGeometry
 class for pack all variables related with DottedGeometry More...
 
class  DottedGeometryColor
 class for pack all variables related with DottedGeometry color More...
 
struct  ExtremeGeometry
 struct for variables used in Geometry extremes More...
 
class  Geometry
 class for NETEDIT geometries over lanes More...
 
class  HierarchicalConnections
 class to pack all variables and functions relative to connections between hierarchical element and their children More...
 
class  Lane2laneConnection
 class lane2lane connection geometry More...
 
struct  SegmentGeometry
 struct for pack all variables related with geometry of elemements divided in segments More...
 

Public Types

enum class  DottedContourType { INSPECT , FRONT , MOVE }
 

Static Public Member Functions

static void adjustStartPosGeometricPath (double &startPos, const GNELane *startLane, double &endPos, const GNELane *endLane)
 adjust start and end positions in geometric path More...
 
static void calculateLaneGeometricPath (GNEGeometry::SegmentGeometry &segmentGeometry, const std::vector< GNEPathElements::PathElement > &path, GNEGeometry::ExtremeGeometry &extremeGeometry)
 calculate route between lanes More...
 
static double calculateLength (const Position &first, const Position &second)
 return length between two points (used in geometric calculations) More...
 
static double calculateRotation (const Position &first, const Position &second)
 return angle between two points (used in geometric calculations) More...
 
static void drawDottedContourCircle (const DottedContourType type, const GUIVisualizationSettings &s, 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 drawDottedContourClosedShape (const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double exaggeration)
 draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs) More...
 
static void drawDottedContourEdge (const DottedContourType type, const GUIVisualizationSettings &s, const GNEEdge *edge, const bool drawFrontExtreme, const bool drawBackExtreme)
 draw dotted contour for the given dottedGeometries (used by edges) More...
 
static void drawDottedContourLane (const DottedContourType type, const GUIVisualizationSettings &s, const DottedGeometry &dottedGeometry, const double width, const bool drawFirstExtrem, const bool drawLastExtrem)
 draw dotted contour for the given dottedGeometry (used by lanes, routes, etc.) More...
 
static void drawDottedContourShape (const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double width, const double exaggeration)
 draw dotted contour for the given shape (used by additionals) More...
 
static void drawDottedSquaredShape (const DottedContourType type, const GUIVisualizationSettings &s, 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...
 
static void drawGeometry (const GNEViewNet *viewNet, const Geometry &geometry, const double width)
 draw geometry More...
 
static void drawGeometryPoints (const GUIVisualizationSettings &s, const GNEViewNet *viewNet, const PositionVector &shape, const RGBColor &geometryPointColor, const RGBColor &textColor, const double radius, const double exaggeration)
 draw geometry points More...
 
static void drawLaneGeometry (const GNEViewNet *viewNet, const PositionVector &shape, const std::vector< double > &rotations, const std::vector< double > &lengths, const std::vector< RGBColor > &colors, double width)
 draw lane geometry (use their own function due colors) More...
 
static void drawMovingHint (const GUIVisualizationSettings &s, const GNEViewNet *viewNet, const PositionVector &shape, const RGBColor &hintColor, const double radius, const double exaggeration)
 draw moving hint More...
 
static void drawSegmentGeometry (const GNEViewNet *viewNet, const SegmentGeometry::Segment &segment, const double width)
 draw geometry segment More...
 
static PositionVector getVertexCircleAroundPosition (const Position &pos, const double width, const int steps=8)
 get a circle around the given position More...
 
static void rotateOverLane (const double rot)
 rotate over lane (used by Lock icons, detector logos, etc.) More...
 
static void updateGeometricPath (GNEGeometry::SegmentGeometry &segmentGeometry, const GNELane *lane, GNEGeometry::ExtremeGeometry &extremeGeometry)
 calculate route between edges More...
 

Static Private Member Functions

static int angleLookup (const double angleDeg)
 normalize angle for lookup in myCircleCoords More...
 

Static Private Attributes

static PositionVector myCircleCoords
 Storage for precomputed sin/cos-values describing a circle. More...
 

Detailed Description

Definition at line 55 of file GNEGeometry.h.

Member Enumeration Documentation

◆ DottedContourType

Enumerator
INSPECT 
FRONT 
MOVE 

Definition at line 150 of file GNEGeometry.h.

Member Function Documentation

◆ adjustStartPosGeometricPath()

void GNEGeometry::adjustStartPosGeometricPath ( double &  startPos,
const GNELane startLane,
double &  endPos,
const GNELane endLane 
)
static

adjust start and end positions in geometric path

Definition at line 1039 of file GNEGeometry.cpp.

References GNELane::getLaneShape(), and PositionVector::length().

Referenced by calculateLaneGeometricPath(), and updateGeometricPath().

Here is the caller graph for this function:

◆ angleLookup()

int GNEGeometry::angleLookup ( const double  angleDeg)
staticprivate

normalize angle for lookup in myCircleCoords

Definition at line 1596 of file GNEGeometry.cpp.

References CIRCLE_RESOLUTION, and myCircleCoords.

Referenced by getVertexCircleAroundPosition().

Here is the caller graph for this function:

◆ calculateLaneGeometricPath()

◆ calculateLength()

double GNEGeometry::calculateLength ( const Position first,
const Position second 
)
static

return length between two points (used in geometric calculations)

Definition at line 1032 of file GNEGeometry.cpp.

References Position::distanceTo2D().

Referenced by GNEGeometry::Geometry::calculateShapeRotationsAndLengths(), GNEGeometry::DottedGeometry::calculateShapeRotationsAndLengths(), and GNEViewNet::drawLaneCandidates().

Here is the caller graph for this function:

◆ calculateRotation()

double GNEGeometry::calculateRotation ( const Position first,
const Position second 
)
static

return angle between two points (used in geometric calculations)

Definition at line 1025 of file GNEGeometry.cpp.

References M_PI, Position::x(), and Position::y().

Referenced by GNEGeometry::Geometry::calculateShapeRotationsAndLengths(), GNEGeometry::DottedGeometry::calculateShapeRotationsAndLengths(), GNELane::drawArrows(), and GNEViewNet::drawLaneCandidates().

Here is the caller graph for this function:

◆ drawDottedContourCircle()

void GNEGeometry::drawDottedContourCircle ( const DottedContourType  type,
const GUIVisualizationSettings s,
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 1534 of file GNEGeometry.cpp.

References drawDottedContourClosedShape(), and getVertexCircleAroundPosition().

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

Here is the caller graph for this function:

◆ drawDottedContourClosedShape()

void GNEGeometry::drawDottedContourClosedShape ( const DottedContourType  type,
const GUIVisualizationSettings s,
const PositionVector shape,
const double  exaggeration 
)
static

◆ drawDottedContourEdge()

◆ drawDottedContourLane()

◆ drawDottedContourShape()

void GNEGeometry::drawDottedContourShape ( const DottedContourType  type,
const GUIVisualizationSettings s,
const PositionVector shape,
const double  width,
const double  exaggeration 
)
static

◆ drawDottedSquaredShape()

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

◆ drawGeometry()

◆ drawGeometryPoints()

◆ drawLaneGeometry()

void GNEGeometry::drawLaneGeometry ( const GNEViewNet viewNet,
const PositionVector shape,
const std::vector< double > &  rotations,
const std::vector< double > &  lengths,
const std::vector< RGBColor > &  colors,
double  width 
)
static

◆ drawMovingHint()

◆ drawSegmentGeometry()

◆ getVertexCircleAroundPosition()

PositionVector GNEGeometry::getVertexCircleAroundPosition ( const Position pos,
const double  width,
const int  steps = 8 
)
static

get a circle around the given position

Definition at line 1566 of file GNEGeometry.cpp.

References PositionVector::add(), angleLookup(), CIRCLE_RESOLUTION, DEG2RAD, myCircleCoords, Position::x(), and Position::y().

Referenced by drawDottedContourCircle().

Here is the caller graph for this function:

◆ rotateOverLane()

void GNEGeometry::rotateOverLane ( const double  rot)
static

◆ updateGeometricPath()

Field Documentation

◆ myCircleCoords

PositionVector GNEGeometry::myCircleCoords
staticprivate

Storage for precomputed sin/cos-values describing a circle.

Definition at line 574 of file GNEGeometry.h.

Referenced by angleLookup(), and getVertexCircleAroundPosition().


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