Eclipse SUMO - Simulation of Urban MObility
GNEContour Class Reference

#include <GNEContour.h>

Collaboration diagram for GNEContour:
[legend]

Public Member Functions

void clearContour ()
 void clear contour More...
 
Boundary getContourBoundary () const
 get contour boundary More...
 
 GNEContour ()
 Constructor. More...
 
 ~GNEContour ()
 destructor More...
 
void calculateContourClosedShape (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double scale) const
 calculate contours More...
 
void calculateContourExtrudedShape (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double extrusionWidth, const double scale, const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const
 calculate contour extruded (used in elements formed by a central shape) More...
 
void calculateContourRectangleShape (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, const double width, const double height, const double offsetX, const double offsetY, const double rot, const double scale) const
 calculate contour (for rectangled elements) More...
 
void calculateContourCircleShape (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, double radius, const double scale) const
 calculate contour (circle elements) More...
 
void calculateContourEdge (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const GUIGlObject *elementToRegister, const bool closeFirstExtrem, const bool closeLastExtrem) const
 calculate contour edge More...
 
void calculateContourEdges (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
 calculate contour between two consecutive edges More...
 
void calculateContourFirstGeometryPoint (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double radius, const double scale) const
 calculate contour for first geometry point More...
 
void calculateContourLastGeometryPoint (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double radius, const double scale) const
 calculate contour for last geometry point More...
 
void calculateContourMiddleGeometryPoints (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double radius, const double scale) const
 calculate contour for middle geometry point More...
 
void calculateContourAllGeometryPoints (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double radius, const double scale, const bool calculatePosOverShape) const
 calculate contour for all geometry points More...
 
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 More...
 
void drawDottedContours (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
 drawing contour functions More...
 
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 More...
 
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) More...
 

Private Member Functions

void drawDottedContour (const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const double lineWidth, const bool addOffset) const
 draw dotted contour More...
 
 GNEContour (const GNEContour &)=delete
 Invalidated copy constructor. More...
 
GNEContouroperator= (const GNEContour &src)=delete
 Invalidated assignment operator. More...
 
build contour functions
void buildContourClosedShape (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double scale) const
 build contour around closed shape (ej. polygon) More...
 
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) More...
 
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 More...
 
void buildContourCircle (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, double radius, const double scale) const
 build contour aorund circle More...
 
void buildContourEdge (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const bool closeFirstExtrem, const bool closeLastExtrem) const
 build contour around edge More...
 
void buildContourEdges (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
 build contour between two from-to edgeds More...
 

Private Attributes

PositionVectormyCalculatedShape
 calculated shape More...
 
BoundarymyContourBoundary
 contourboundary More...
 
std::vector< GUIDottedGeometry > * myDottedGeometries
 dotted geometries More...
 

Static Private Attributes

static GUIDottedGeometry::DottedGeometryColor myDottedGeometryColor
 dotted geometry color More...
 

Detailed Description

Definition at line 37 of file GNEContour.h.

Constructor & Destructor Documentation

◆ GNEContour() [1/2]

GNEContour::GNEContour ( )

Constructor.

Definition at line 44 of file GNEContour.cpp.

◆ ~GNEContour()

GNEContour::~GNEContour ( )

destructor

Definition at line 51 of file GNEContour.cpp.

References myCalculatedShape, myContourBoundary, and myDottedGeometries.

◆ GNEContour() [2/2]

GNEContour::GNEContour ( const GNEContour )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ buildContourCircle()

void GNEContour::buildContourCircle ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const Position pos,
double  radius,
const double  scale 
) const
private

build contour aorund circle

Definition at line 476 of file GNEContour.cpp.

References GUIVisualizationSettings::CircleResolution16, GUIVisualizationSettings::CircleResolution32, PositionVector::getBoxBoundary(), GUIGeometry::getVertexCircleAroundPosition(), myCalculatedShape, myContourBoundary, myDottedGeometries, Boundary::reset(), Position::x(), and Position::y().

Referenced by calculateContourCircleShape().

Here is the caller graph for this function:

◆ buildContourClosedShape()

void GNEContour::buildContourClosedShape ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const PositionVector shape,
const double  scale 
) const
private

build contour around closed shape (ej. polygon)

Definition at line 383 of file GNEContour.cpp.

References PositionVector::closePolygon(), PositionVector::getBoxBoundary(), myCalculatedShape, myContourBoundary, myDottedGeometries, Boundary::reset(), and PositionVector::scaleRelative().

Referenced by calculateContourClosedShape().

Here is the caller graph for this function:

◆ buildContourEdge()

void GNEContour::buildContourEdge ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEEdge edge,
const bool  closeFirstExtrem,
const bool  closeLastExtrem 
) const
private

build contour around edge

Definition at line 506 of file GNEContour.cpp.

References OptionsCont::getBool(), PositionVector::getBoxBoundary(), GNELane::getDrawingConstants(), GNELane::DrawingConstants::getDrawingWidth(), GNELane::getLaneGeometry(), GNEEdge::getLanes(), GNELane::DrawingConstants::getOffset(), OptionsCont::getOptions(), GUIGeometry::getShape(), myCalculatedShape, myContourBoundary, myDottedGeometries, and PositionVector::reverse().

Referenced by calculateContourEdge().

Here is the caller graph for this function:

◆ buildContourEdges()

void GNEContour::buildContourEdges ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEEdge fromEdge,
const GNEEdge toEdge 
) const
private

build contour between two from-to edgeds

Definition at line 547 of file GNEContour.cpp.

Referenced by calculateContourEdges().

Here is the caller graph for this function:

◆ buildContourExtrudedShape()

void GNEContour::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
private

build contour around extruded shape (ej. lane)

Definition at line 404 of file GNEContour.cpp.

References PositionVector::getBoxBoundary(), myCalculatedShape, myContourBoundary, myDottedGeometries, Boundary::reset(), and PositionVector::reverse().

Referenced by calculateContourExtrudedShape().

Here is the caller graph for this function:

◆ buildContourRectangle()

void GNEContour::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
private

build contour around rectangle

Definition at line 445 of file GNEContour.cpp.

References PositionVector::add(), DEG2RAD, PositionVector::getBoxBoundary(), myCalculatedShape, myContourBoundary, myDottedGeometries, Boundary::reset(), PositionVector::rotate2D(), and PositionVector::scaleRelative().

Referenced by calculateContourRectangleShape().

Here is the caller graph for this function:

◆ calculateContourAllGeometryPoints()

void GNEContour::calculateContourAllGeometryPoints ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const PositionVector shape,
const double  radius,
const double  scale,
const bool  calculatePosOverShape 
) const

calculate contour for all geometry points

Definition at line 192 of file GNEContour.cpp.

References GUIViewObjectsHandler::checkGeometryPoint(), GUIViewObjectsHandler::checkPositionOverShape(), GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

Referenced by GNEConnection::calculateConnectionContour(), GNEAdditional::calculateContourPolygons(), GNECrossing::calculateCrossingContour(), GNEJunction::calculateJunctioncontour(), and GNELane::calculateLaneContour().

Here is the caller graph for this function:

◆ calculateContourCircleShape()

void GNEContour::calculateContourCircleShape ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const Position pos,
double  radius,
const double  scale 
) const

calculate contour (circle elements)

Definition at line 117 of file GNEContour.cpp.

References buildContourCircle(), GUIViewObjectsHandler::checkCircleElement(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, and myContourBoundary.

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

Here is the caller graph for this function:

◆ calculateContourClosedShape()

void GNEContour::calculateContourClosedShape ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const PositionVector shape,
const double  scale 
) const

calculate contours

calculate contour (for closed shapes)

Definition at line 75 of file GNEContour.cpp.

References buildContourClosedShape(), GUIViewObjectsHandler::checkShapeElement(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.

Referenced by GNEAdditional::calculateContourPolygons(), GNEJunction::calculateJunctioncontour(), and GNEWalkingArea::drawGL().

Here is the caller graph for this function:

◆ calculateContourEdge()

void GNEContour::calculateContourEdge ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEEdge edge,
const GUIGlObject elementToRegister,
const bool  closeFirstExtrem,
const bool  closeLastExtrem 
) const

calculate contour edge

Definition at line 130 of file GNEContour.cpp.

References buildContourEdge(), GUIViewObjectsHandler::checkShapeElement(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.

Referenced by GNEEdge::calculateEdgeContour(), GNEEdgeData::drawLanePartialGL(), and GNEEdgeRelData::drawLanePartialGL().

Here is the caller graph for this function:

◆ calculateContourEdgeGeometryPoints()

void GNEContour::calculateContourEdgeGeometryPoints ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEEdge edge,
const double  radius,
const bool  calculatePosOverShape,
const bool  firstExtrem,
const bool  lastExtrem 
) const

◆ calculateContourEdges()

void GNEContour::calculateContourEdges ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEEdge fromEdge,
const GNEEdge toEdge 
) const

calculate contour between two consecutive edges

Definition at line 144 of file GNEContour.cpp.

References buildContourEdges().

Referenced by GNEEdgeRelData::drawJunctionPartialGL().

Here is the caller graph for this function:

◆ calculateContourExtrudedShape()

void GNEContour::calculateContourExtrudedShape ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const PositionVector shape,
const double  extrusionWidth,
const double  scale,
const bool  closeFirstExtrem,
const bool  closeLastExtrem,
const double  offset 
) const

◆ calculateContourFirstGeometryPoint()

void GNEContour::calculateContourFirstGeometryPoint ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const PositionVector shape,
const double  radius,
const double  scale 
) const

calculate contour for first geometry point

Definition at line 152 of file GNEContour.cpp.

References GUIViewObjectsHandler::checkGeometryPoint(), GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

Referenced by GNEStoppingPlace::calculateStoppingPlaceContour(), GNEEdge::drawEndGeometryPoint(), and GNEEdge::drawStartGeometryPoint().

Here is the caller graph for this function:

◆ calculateContourLastGeometryPoint()

void GNEContour::calculateContourLastGeometryPoint ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const PositionVector shape,
const double  radius,
const double  scale 
) const

calculate contour for last geometry point

Definition at line 164 of file GNEContour.cpp.

References GUIViewObjectsHandler::checkGeometryPoint(), GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

Referenced by GNEStoppingPlace::calculateStoppingPlaceContour().

Here is the caller graph for this function:

◆ calculateContourMiddleGeometryPoints()

void GNEContour::calculateContourMiddleGeometryPoints ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const PositionVector shape,
const double  radius,
const double  scale 
) const

◆ calculateContourRectangleShape()

void GNEContour::calculateContourRectangleShape ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const Position pos,
const double  width,
const double  height,
const double  offsetX,
const double  offsetY,
const double  rot,
const double  scale 
) const

◆ clearContour()

void GNEContour::clearContour ( )

void clear contour

Definition at line 65 of file GNEContour.cpp.

References myCalculatedShape, myContourBoundary, myDottedGeometries, and Boundary::reset().

Referenced by GNEJunction::setMoveShape().

Here is the caller graph for this function:

◆ drawDottedContour()

void GNEContour::drawDottedContour ( const GUIVisualizationSettings s,
GUIDottedGeometry::DottedContourType  type,
const double  lineWidth,
const bool  addOffset 
) const
private

draw dotted contour

Definition at line 555 of file GNEContour.cpp.

References GLO_DOTTEDCONTOUR, myDottedGeometries, myDottedGeometryColor, GLHelper::popMatrix(), GLHelper::pushMatrix(), and GUIDottedGeometry::DottedGeometryColor::reset().

Referenced by drawDottedContours().

Here is the caller graph for this function:

◆ drawDottedContourGeometryPoints()

◆ drawDottedContours()

void GNEContour::drawDottedContours ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEAttributeCarrier AC,
const double  lineWidth,
const bool  addOffset 
) const

drawing contour functions

draw dotted contours (basics, select, delete, inspect...)

Definition at line 265 of file GNEContour.cpp.

References GNEAttributeCarrier::checkDrawDeleteContour(), GNEAttributeCarrier::checkDrawFromContour(), GNEAttributeCarrier::checkDrawFrontContour(), GNEAttributeCarrier::checkDrawInspectContour(), GNEAttributeCarrier::checkDrawMoveContour(), GNEAttributeCarrier::checkDrawOverContour(), GNEAttributeCarrier::checkDrawRelatedContour(), GNEAttributeCarrier::checkDrawSelectContour(), GNEAttributeCarrier::checkDrawToContour(), GUIVisualizationSettings::disableDottedContours, GUIVisualizationSettings::DottedContours, drawDottedContour(), GUIDottedGeometry::FROM, GUIDottedGeometry::FRONT, GUIDottedGeometry::INSPECT, GUIDottedGeometry::MOVE, GUIDottedGeometry::OVER, GUIDottedGeometry::RELATED, GUIDottedGeometry::REMOVE, GUIDottedGeometry::SELECT, and GUIDottedGeometry::TO.

Referenced by GNECalibrator::drawCalibratorSymbol(), GNEAccess::drawGL(), GNEBusStop::drawGL(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEEntryExitDetector::drawGL(), GNEInductionLoopDetector::drawGL(), GNEInstantInductionLoopDetector::drawGL(), GNELaneAreaDetector::drawGL(), GNEParkingArea::drawGL(), GNEParkingSpace::drawGL(), GNERerouterSymbol::drawGL(), GNERouteProbe::drawGL(), GNETAZ::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), GNETAZRelData::drawGL(), GNEContainer::drawGL(), GNEPerson::drawGL(), GNEStop::drawGL(), GNEVehicle::drawGL(), GNEConnection::drawGL(), GNECrossing::drawGL(), GNEEdge::drawGL(), GNEInternalLane::drawGL(), GNEJunction::drawGL(), GNELane::drawGL(), GNEWalkingArea::drawGL(), GNEPOI::drawGL(), GNEPoly::drawGL(), GNELaneAreaDetector::drawJunctionPartialGL(), GNEOverheadWire::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNELaneAreaDetector::drawLanePartialGL(), GNEOverheadWire::drawLanePartialGL(), GNEEdgeData::drawLanePartialGL(), GNEEdgeRelData::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEAdditional::drawListedAdditional(), GNEDemandElementPlan::drawPlanGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), GNEDemandElementPlan::drawPlanLanePartial(), GNEAdditional::drawSquaredAdditional(), GNEStopPlan::drawStopOverEdge(), and GNEStopPlan::drawStopOverStoppingPlace().

Here is the caller graph for this function:

◆ drawInnenContourClosed()

void GNEContour::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)

Definition at line 358 of file GNEContour.cpp.

References PositionVector::closePolygon(), myCalculatedShape, myDottedGeometries, myDottedGeometryColor, GLHelper::popMatrix(), GLHelper::pushMatrix(), GUIDottedGeometry::DottedGeometryColor::reset(), and PositionVector::scaleRelative().

Referenced by GNEWalkingArea::drawWalkingArea().

Here is the caller graph for this function:

◆ getContourBoundary()

Boundary GNEContour::getContourBoundary ( ) const

get contour boundary

Definition at line 59 of file GNEContour.cpp.

References myContourBoundary.

Referenced by GNEAdditional::getCenteringBoundary(), GNEConnection::getCenteringBoundary(), GNECrossing::getCenteringBoundary(), GNEEdgeType::getCenteringBoundary(), GNEInternalLane::getCenteringBoundary(), GNELane::getCenteringBoundary(), GNELaneType::getCenteringBoundary(), and GNEWalkingArea::getCenteringBoundary().

Here is the caller graph for this function:

◆ operator=()

GNEContour& GNEContour::operator= ( const GNEContour src)
privatedelete

Invalidated assignment operator.

Field Documentation

◆ myCalculatedShape

◆ myContourBoundary

◆ myDottedGeometries

◆ myDottedGeometryColor

GUIDottedGeometry::DottedGeometryColor GNEContour::myDottedGeometryColor
staticprivate

dotted geometry color

Definition at line 137 of file GNEContour.h.

Referenced by drawDottedContour(), drawDottedContourGeometryPoints(), and drawInnenContourClosed().


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