 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
66 Geometry(
const PositionVector& shape,
const std::vector<double>& shapeRotations,
const std::vector<double>& shapeLengths);
184 const DottedGeometry& topDottedGeometry,
const bool drawFirstExtrem,
185 const DottedGeometry& botDottedGeometry,
const bool drawLastExtrem);
264 const std::vector<double>& lengths,
const std::vector<RGBColor>& colors,
double width,
const bool onlyContour =
false);
274 const RGBColor& geometryPointColor,
const RGBColor& textColor,
const double radius,
const double exaggeration);
278 const RGBColor& hintColor,
const double radius,
const double exaggeration);
282 const bool drawFrontExtreme,
const bool drawBackExtreme);
286 const double exaggeration,
const double lineWidth = -1);
290 const double width,
const double exaggeration,
const bool drawFirstExtrem,
const bool drawLastExtrem,
291 const double lineWidth = -1);
295 const double radius,
const double exaggeration);
299 const double width,
const double height,
const double offsetX,
const double offsetY,
300 const double rot,
const double exaggeration);
std::vector< double > myShapeRotations
The rotations of the shape (note: Always size = myShape.size()-1)
static double calculateLength(const Position &first, const Position &second)
return length between two points (used in geometric calculations)
static void drawDottedContourShape(const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double width, const double exaggeration, const bool drawFirstExtrem, const bool drawLastExtrem, const double lineWidth=-1)
draw dotted contour for the given shape (used by additionals)
An Element which don't belongs to GNENet but has influency in the simulation.
const GNELane * myFromLane
from lane
An Element which don't belongs to GNENet but has influency in the simulation.
static PositionVector getVertexCircleAroundPosition(const Position &pos, const double width, const int steps=8)
get a circle around the given position
void moveShapeToSide(const double value)
move shape to side
static int angleLookup(const double angleDeg)
normalize angle for lookup in myCircleCoords
void calculateShapeRotationsAndLengths()
calculate shape rotations and lengths
static void drawParentLine(const GUIVisualizationSettings &s, const Position &parent, const Position &child, const RGBColor &color, const bool drawEntire)
draw line between parent and children (used in NETEDIT)
bool myColorFlag
flag to get color
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
class lane2lane connection geometry
Segment()
default constructor
void updateLane2laneConnection()
update
class for pack all variables related with DottedGeometry color
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)
std::vector< double > myShapeLengths
The lengths of the shape (note: Always size = myShape.size()-1)
void changeColor()
change color
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
const RGBColor getColor(DottedContourType type)
get inspected color (and change flag)
DottedGeometryColor(const GUIVisualizationSettings &settings)
constructor
void invertOffset()
invert offset of all segments
void updateGeometry(const PositionVector &shape)
update entire geometry
std::vector< double > rotations
rotations
class for NETEDIT geometries over lanes
A road/street connecting two junctions (netedit-version)
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, const bool onlyContour=false)
draw lane geometry (use their own function due colors)
class for pack all variables related with DottedGeometry
static void drawGeometry(const GNEViewNet *viewNet, const Geometry &geometry, const double width)
draw geometry
PositionVector shape
shape
A point in 2D or 3D with translation and scaling methods.
static void rotateOverLane(const double rot)
rotate over lane (used by Lock icons, detector logos, etc.)
void setWidth(const double width)
change default width
void scaleGeometry(const double scale)
scale geometry
bool exist(const GNELane *toLane) const
check if exist a lane2lane geometry for the given tolane
DottedGeometry & operator=(const DottedGeometry &other)=delete
Invalidated assignment operator.
void clearGeometry()
clear geometry
const std::vector< double > & getShapeLengths() const
The lengths of the single shape parts.
static void drawChildLine(const GUIVisualizationSettings &s, const Position &child, const Position &parent, const RGBColor &color, const bool drawEntire)
draw line between child and parent (used in NETEDIT)
Lane2laneConnection & operator=(const Lane2laneConnection &other)=delete
Invalidated assignment operator.
void updateDottedGeometry(const GUIVisualizationSettings &s, const GNELane *lane)
update DottedGeometry (using lane shape)
double myWidth
geometry width
const GNEGeometry::Geometry & getLane2laneGeometry(const GNELane *toLane) const
get lane2lane geometry
static void drawMovingHint(const GUIVisualizationSettings &s, const GNEViewNet *viewNet, const PositionVector &shape, const RGBColor &hintColor, const double radius, const double exaggeration)
draw moving hint
std::vector< double > lengths
lengths
void drawDottedGeometry(DottedGeometryColor &dottedGeometryColor, GNEGeometry::DottedContourType type, const double customWidth=-1) const
draw inspected dottedShape
static void drawDottedContourClosedShape(const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double exaggeration, const double lineWidth=-1)
draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs)
const GUIVisualizationSettings & mySettings
pointer to GUIVisualizationSettings
double getWidth() const
get width
PositionVector myShape
element shape
Geometry()
default constructor
static PositionVector myCircleCoords
Storage for precomputed sin/cos-values describing a circle.
DottedGeometry()
constructor
void reset()
rest Dotted Geometry Color
static void drawContourGeometry(const Geometry &geometry, const double width, const bool drawExtremes=false)
draw contour geometry
static void adjustStartPosGeometricPath(double &startPos, const GNELane *startLane, double &endPos, const GNELane *endLane)
adjust start and end positions in geometric path
std::vector< DottedGeometry::Segment > myDottedGeometrySegments
dotted element shape (note: It's centered in 0,0 due scaling)
static double calculateRotation(const Position &first, const Position &second)
return angle between two points (used in geometric calculations)
Lane2laneConnection()
constructor
Stores the information about how to visualize structures.
double offset
drawing offset (-1 or 1 only)
std::map< const GNELane *, GNEGeometry::Geometry > myConnectionsMap
connection shape
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)
DottedGeometryColor & operator=(const DottedGeometryColor &other)=delete
Invalidated assignment operator.
void updateSinglePosGeometry(const Position &position, const double rotation)
update position and rotation
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getShape() const
The shape of the additional element.
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)
void calculateShapeRotationsAndLengths()
calculate shape rotations and lengths