Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEContour Class Reference

#include <GNEContour.h>

Collaboration diagram for GNEContour:
[legend]

Public Member Functions

void clearContour () const
 void clear contour
Boundary getContourBoundary () const
 get contour boundary
 GNEContour ()
 Constructor.
 ~GNEContour ()
 destructor
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 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)
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)
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 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 calculateContourEdges (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
 calculate contour between two consecutive edges
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 bool forceCalculation=false) const
 calculate contour for first geometry point
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 bool forceCalculation=false) const
 calculate contour for last geometry point
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 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 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
bool checkDrawPathContour (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC) const
 drawing contour functions
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 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 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)
bool drawDottedContour (const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const double lineWidth, const bool addOffset, const double extraZOffset=0) const
 draw dotted contour (call out of this class only in special cases, for example in WalkingAreas)

Private Member Functions

 GNEContour (const GNEContour &)=delete
 Invalidated copy constructor.
GNEContouroperator= (const GNEContour &src)=delete
 Invalidated assignment operator.
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)
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
void buildContourCircle (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, double radius, const double scale) const
 build contour aorund circle
void buildContourEdge (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const bool closeFirstExtrem, const bool closeLastExtrem) const
 build contour around edge
void buildContourEdges (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
 build contour between two from-to edgeds

Private Attributes

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

Static Private Attributes

static GUIDottedGeometry::DottedGeometryColor myDottedGeometryColor
 dotted geometry color

Detailed Description

Definition at line 38 of file GNEContour.h.

Constructor & Destructor Documentation

◆ GNEContour() [1/2]

GNEContour::GNEContour ( )

Constructor.

Definition at line 43 of file GNEContour.cpp.

References myCalculatedShape, myContourBoundary, and myDottedGeometries.

Referenced by GNEContour(), and operator=().

Here is the caller graph for this function:

◆ ~GNEContour()

GNEContour::~GNEContour ( )

destructor

Definition at line 50 of file GNEContour.cpp.

References myCalculatedShape, myContourBoundary, and myDottedGeometries.

◆ GNEContour() [2/2]

GNEContour::GNEContour ( const GNEContour & )
privatedelete

Invalidated copy constructor.

References GNEContour().

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 554 of file GNEContour.cpp.

References GUIVisualizationSettings::CircleResolution16, GUIVisualizationSettings::CircleResolution32, GUIGeometry::getVertexCircleAroundPosition(), myCalculatedShape, myContourBoundary, myDottedGeometries, 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 461 of file GNEContour.cpp.

References myCalculatedShape, myContourBoundary, and myDottedGeometries.

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 584 of file GNEContour.cpp.

References OptionsCont::getBool(), GNEHierarchicalElement::getChildLanes(), GNELane::getDrawingConstants(), GNELane::DrawingConstants::getDrawingWidth(), GNELane::getLaneGeometry(), 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 625 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 482 of file GNEContour.cpp.

References myCalculatedShape, myContourBoundary, myDottedGeometries, 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 523 of file GNEContour.cpp.

References DEG2RAD, myCalculatedShape, myContourBoundary, and myDottedGeometries.

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 layer,
const double radius,
const double scale,
const bool calculatePosOverShape ) const

calculate contour for all geometry points

Definition at line 196 of file GNEContour.cpp.

References GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

◆ calculateContourCircleShape()

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

Definition at line 121 of file GNEContour.cpp.

References buildContourCircle(), GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

Referenced by GNELaneAreaDetector::drawLanePartialGL().

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 layer,
const double scale,
const GUIGlObject * boundaryParent,
const bool addToSelectedObjects = true ) const

calculate contours

calculate contour (for closed shapes)

Definition at line 74 of file GNEContour.cpp.

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

◆ calculateContourEdge()

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

Definition at line 135 of file GNEContour.cpp.

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

Referenced by 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 149 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 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)

Definition at line 90 of file GNEContour.cpp.

References buildContourExtrudedShape(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.

Referenced by GNELaneAreaDetector::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNELaneAreaDetector::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNEDemandElementPlan::drawPlanLanePartial().

Here is the caller graph for this function:

◆ calculateContourFirstGeometryPoint()

void GNEContour::calculateContourFirstGeometryPoint ( const GUIVisualizationSettings & s,
const GUIVisualizationSettings::Detail d,
const GUIGlObject * glObject,
const PositionVector & shape,
const double layer,
const double radius,
const double scale,
const bool forceCalculation = false ) const

calculate contour for first geometry point

Definition at line 157 of file GNEContour.cpp.

References GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

◆ calculateContourLastGeometryPoint()

void GNEContour::calculateContourLastGeometryPoint ( const GUIVisualizationSettings & s,
const GUIVisualizationSettings::Detail d,
const GUIGlObject * glObject,
const PositionVector & shape,
const double layer,
const double radius,
const double scale,
const bool forceCalculation = false ) const

calculate contour for last geometry point

Definition at line 169 of file GNEContour.cpp.

References GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

◆ calculateContourMiddleGeometryPoints()

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

Definition at line 181 of file GNEContour.cpp.

References GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

◆ 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 layer,
const double offsetX,
const double offsetY,
const double rot,
const double scale,
const GUIGlObject * boundaryParent ) const

calculate contour (for rectangled elements)

Definition at line 107 of file GNEContour.cpp.

References buildContourRectangle(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.

◆ checkDrawPathContour()

bool GNEContour::checkDrawPathContour ( const GUIVisualizationSettings & s,
const GUIVisualizationSettings::Detail d,
const GNEAttributeCarrier * AC ) const

◆ clearContour()

void GNEContour::clearContour ( ) const

void clear contour

Definition at line 64 of file GNEContour.cpp.

References myCalculatedShape, myContourBoundary, and myDottedGeometries.

◆ drawDottedContour()

bool GNEContour::drawDottedContour ( const GUIVisualizationSettings & s,
GUIDottedGeometry::DottedContourType type,
const double lineWidth,
const bool addOffset,
const double extraZOffset = 0 ) const

draw dotted contour (call out of this class only in special cases, for example in WalkingAreas)

Definition at line 442 of file GNEContour.cpp.

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

Referenced by drawDottedContours().

Here is the caller graph for this function:

◆ drawDottedContourGeometryPoints()

◆ drawDottedContours()

bool GNEContour::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...)

Definition at line 316 of file GNEContour.cpp.

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

Referenced by GNELaneAreaDetector::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNEEdgeData::drawLanePartialGL(), GNEEdgeRelData::drawLanePartialGL(), GNELaneAreaDetector::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNEDemandElementPlan::drawPlanLanePartial().

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 417 of file GNEContour.cpp.

References myCalculatedShape, myDottedGeometries, myDottedGeometryColor, GLHelper::popMatrix(), and GLHelper::pushMatrix().

◆ getContourBoundary()

Boundary GNEContour::getContourBoundary ( ) const

get contour boundary

Definition at line 58 of file GNEContour.cpp.

References myContourBoundary.

◆ operator=()

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

Invalidated assignment operator.

References GNEContour().

Field Documentation

◆ myCalculatedShape

◆ myContourBoundary

◆ myDottedGeometries

◆ myDottedGeometryColor

GUIDottedGeometry::DottedGeometryColor GNEContour::myDottedGeometryColor
staticprivate

dotted geometry color

Definition at line 151 of file GNEContour.h.

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


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