50 const std::vector<GNEJunction*>& junctionParents,
51 const std::vector<GNEEdge*>& edgeParents,
52 const std::vector<GNELane*>& laneParents,
53 const std::vector<GNEAdditional*>& additionalParents,
54 const std::vector<GNEDemandElement*>& demandElementParents,
55 const std::vector<GNEGenericData*>& genericDataParents) :
57 GNEHierarchicalElement(net, tag, junctionParents, edgeParents, laneParents, additionalParents, demandElementParents, genericDataParents),
58 myAdditionalName(additionalName) {
65 const std::vector<GNEJunction*>& junctionParents,
66 const std::vector<GNEEdge*>& edgeParents,
67 const std::vector<GNELane*>& laneParents,
68 const std::vector<GNEAdditional*>& additionalParents,
69 const std::vector<GNEDemandElement*>& demandElementParents,
70 const std::vector<GNEGenericData*>& genericDataParents) :
72 GNEHierarchicalElement(net, tag, junctionParents, edgeParents, laneParents, additionalParents, demandElementParents, genericDataParents),
73 myAdditionalName(additionalName) {
163 contourBoundary.
grow(5);
164 return contourBoundary;
167 geometryBoundary.
grow(5);
168 return geometryBoundary;
172 Boundary centerBoundary(0, 0, 0, 0);
173 centerBoundary.
grow(5);
174 return centerBoundary;
187 if (inspectedElements.isInspectingSingleElement()) {
192 }
else if ((inspectedElements.getFirstAC()->getTagProperty().getTag() ==
SUMO_TAG_TAZREL) &&
196 }
else if (modes.isCurrentSupermodeDemand()) {
200 planCreator = viewParent->getPersonFrame()->getPlanCreator();
202 planCreator = viewParent->getPersonPlanFrame()->getPlanCreator();
204 planCreator = viewParent->getContainerFrame()->getPlanCreator();
206 planCreator = viewParent->getContainerPlanFrame()->getPlanCreator();
211 const auto additionalID =
getID();
222 const auto& selectedTAZs = viewParent->getVehicleFrame()->getPathCreator()->getSelectedTAZs();
224 if ((selectedTAZs.size() > 0) && (selectedTAZs.front() ==
this)) {
228 }
else if (modes.isCurrentSupermodeData()) {
230 const auto& TAZRelDataFrame = viewParent->getTAZRelDataFrame();
231 if (TAZRelDataFrame->shown() && (TAZRelDataFrame->getFirstTAZ() ==
this)) {
247 if (inspectedElements.isInspectingSingleElement()) {
252 }
else if ((inspectedElements.getFirstAC()->getTagProperty().getTag() ==
SUMO_TAG_TAZREL) &&
256 }
else if (modes.isCurrentSupermodeDemand()) {
260 planCreator = viewParent->getPersonFrame()->getPlanCreator();
262 planCreator = viewParent->getPersonPlanFrame()->getPlanCreator();
264 planCreator = viewParent->getContainerFrame()->getPlanCreator();
266 planCreator = viewParent->getContainerPlanFrame()->getPlanCreator();
271 const auto additionalID =
getID();
282 const auto& selectedTAZs = viewParent->getVehicleFrame()->getPathCreator()->getSelectedTAZs();
284 if ((selectedTAZs.size() > 1) && (selectedTAZs.back() ==
this)) {
288 }
else if (modes.isCurrentSupermodeData()) {
290 const auto& TAZRelDataFrame = viewParent->getTAZRelDataFrame();
291 if (TAZRelDataFrame->shown() && (TAZRelDataFrame->getSecondTAZ() ==
this)) {
313 if (modes.isCurrentSupermodeDemand()) {
317 planSelector = viewParent->getPersonFrame()->getPlanSelector();
319 planSelector = viewParent->getPersonPlanFrame()->getPlanSelector();
321 planSelector = viewParent->getContainerFrame()->getPlanSelector();
323 planSelector = viewParent->getContainerPlanFrame()->getPlanSelector();
333 const auto& vehicleTemplate = viewParent->getVehicleFrame()->getVehicleTagSelector()->getCurrentTemplateAC();
335 if (vehicleTemplate && vehicleTemplate->getTagProperty().vehicleTAZs()) {
339 }
else if (modes.isCurrentSupermodeData()) {
341 const auto& TAZRelDataFrame = viewParent->getTAZRelDataFrame();
342 if (TAZRelDataFrame->shown()) {
343 if (TAZRelDataFrame->getFirstTAZ() && TAZRelDataFrame->getSecondTAZ()) {
345 }
else if (TAZRelDataFrame->getFirstTAZ() ==
this) {
347 }
else if (TAZRelDataFrame->getSecondTAZ() ==
this) {
395 new FXMenuSeparator(ret);
403 new FXMenuSeparator(ret);
441 if (attributeProperty.isUnique()) {
442 ret->
mkItem(attributeProperty.getAttrStr().c_str(),
false,
getAttribute(attributeProperty.getAttr()));
444 ret->
mkItem(attributeProperty.getAttrStr().c_str(),
true,
getAttribute(attributeProperty.getAttr()));
586 const auto tag = additionalChild->getTagProperty().getTag();
589 additionalChild->setAdditionalID(
getID());
667 std::vector<GNEAdditional*> parentAdditionals;
669 if (value.size() > 0) {
671 if ((parentAdditionals.size() == 0) && (parentIndex == 0)) {
715 const double lanePosition = firstLaneShape.
length2D() >= endLaneposition ? endLaneposition : firstLaneShape.
length2D();
737 glTranslated(pos.
x(), pos.
y(), 0);
739 glScaled(exaggeration, exaggeration, 1);
743 glRotated(180, 0, 0, 1);
762 myAdditionalContour.
calculateContourRectangleShape(s, d,
this, pos, size, size,
getType(), 0, 0, 0, exaggeration);
769 const std::string text)
const {
777 const double lineOffset = 0.1875;
778 const double baseOffsetX = 6.25;
779 const double baseOffsetY = 0.6;
783 Position positionLineA = parentPosition;
784 const double positionLineA_Y = (0 - extraOffsetY + baseOffsetY);
786 positionLineA.
add(1 + lineOffset + (baseOffsetX * offsetX), positionLineA_Y, 0);
788 Position positionLineB = parentPosition;
789 const double positionLineB_Y = ((drawPositionIndex * -1) - extraOffsetY + baseOffsetY);
791 positionLineB.
add(1 + lineOffset + (baseOffsetX * offsetX) + (2 * lineOffset), positionLineB_Y, 0);
793 Position signPosition = parentPosition;
797 signPosition.
add(4.5 + (baseOffsetX * offsetX), (drawPositionIndex * -1) - extraOffsetY + 1, 0);
812 if (drawPositionIndex != 0) {
814 const double length = std::abs(positionLineA_Y - positionLineB_Y);
818 glTranslated(positionLineA.
x() + lineOffset, positionLineA.
y(), 0);
819 glRotated(90, 0, 0, 1);
820 glTranslated((length * -0.5), 0, 0);
830 glTranslated(0, -0.06, 0.1);
835 signPosition.
add(-2, -0.43, 0);
839 signPosition.
add(-0.3, 0);
848 glTranslated(signPosition.
x(), signPosition.
y(), 0.1);
852 glRotated(180, 0, 0, 1);
862 myAdditionalContour.
calculateContourRectangleShape(s, d,
this, signPosition, 0.56, 2.75,
getType(), 0, -2.3, 0, 1);
885 if (!demandElement->getTagProperty().isPlacedInRTree()) {
886 demandElement->drawGL(s);
934 if (fromGeometry.
getShape().front().distanceSquaredTo2D(mousePosition) <= (snap_radius * snap_radius)) {
938 }
else if (toGeometry.
getShape().back().distanceSquaredTo2D(mousePosition) <= (snap_radius * snap_radius)) {
946 if (segment->getLaneIndex() == 0) {
949 }
else if (segment->getLaneIndex() == ((
int)
getParentLanes().size() - 1)) {
964 return "jupedsim.walkable_area";
966 return "jupedsim.obstacle";
1044 const double layer,
const double exaggeration,
const bool filledShape)
const {
1088 const bool currentDrawEntire = inspectedElements.
isACInspected(
this) ||
1097 const bool parentInspected = inspectedElements.isACInspected(parent);
1101 currentDrawEntire || parentInspected || parent->isAttributeCarrierSelected(), .05);
1107 for (
const auto& rerouterElement : rerouterInterval->getChildAdditionals()) {
1110 const auto parkingArea = rerouterElement->getParentAdditionals().at(1);
1112 const bool parkingAreaInspected = inspectedElements.isACInspected(parkingArea);
1116 currentDrawEntire || parkingAreaInspected || parkingArea->isAttributeCarrierSelected(), .05);
1124 const bool childInspected = inspectedElements.isACInspected(child);
1130 currentDrawEntire || childInspected || child->isAttributeCarrierSelected(), .05);
1131 }
else if (!onlySymbols || child->getTagProperty().isSymbol()) {
1135 currentDrawEntire || childInspected || child->isAttributeCarrierSelected(), .05);
1145 const double rot,
const RGBColor& baseColor,
const bool ignoreShift)
const {
1151 const double rot,
const RGBColor& baseColor,
const bool ignoreShift)
const {
1157 const double rot,
const RGBColor& baseColor,
const bool ignoreShift)
const {
1164 const double rot,
const RGBColor& baseColor,
const bool ignoreShift)
const {
1172 std::vector<GNEAdditional*> children;
1174 if (!child->getTagProperty().isSymbol()) {
1175 children.push_back(child);
1179 for (
int i = 0; i < (int)children.size(); i++) {
1180 if (children.at(i) ==
this) {
1193 while (laneIt < ((
int)lanes.size() - 1)) {
1195 bool consecutiveFound =
false;
1197 const auto lane = lanes.at(laneIt);
1198 const auto nextLane = lanes.at(laneIt + 1);
1200 for (
const auto& outgoingEdge : lane->getParentEdge()->getToJunction()->getGNEOutgoingEdges()) {
1201 for (
const auto& outgoingLane : outgoingEdge->getLanes()) {
1202 if (outgoingLane == nextLane) {
1203 consecutiveFound =
true;
1208 if (!consecutiveFound) {
1224 while (laneIt < ((
int)lanes.size() - 1)) {
1226 bool connectionFound =
false;
1228 const auto lane = lanes.at(laneIt);
1229 const auto nextLane = lanes.at(laneIt + 1);
1232 connectionFound =
true;
1235 for (
const auto& connection : lane->getParentEdge()->getNBEdge()->getConnections()) {
1236 if ((connection.toEdge == nextLane->getParentEdge()->getNBEdge()) &&
1237 (connection.fromLane == lane->getIndex()) &&
1238 (connection.toLane == nextLane->getIndex())) {
1239 connectionFound =
true;
1243 if (!connectionFound) {
1263 const Position& pos,
const double rot,
const RGBColor& baseColor,
const double fromAngle,
const double toAngle,
1264 const bool )
const {
1270 glTranslated(0, 0, 0.1);
1274 glTranslated(pos.
x(), pos.
y(), 0.1);
1275 glRotated(rot, 0, 0, 1);
1287 if (text.size() <= 23) {
1291 const int textPosition = (int)text.size() - 10;
1293 std::string partA, partB;
1298 for (
int i = 0; i < 10; i++) {
1299 partA.push_back(text.at(i));
1300 partB.push_back(text.at(textPosition + i));
1303 return (partA +
"..." + partB);
@ NETWORK_DELETE
mode for deleting network elements
@ NETWORK_MOVE
mode for moving network elements
@ NETWORK_SELECT
mode for selecting network elements
@ DEMAND_PERSONPLAN
Mode for editing person plan.
@ DEMAND_CONTAINER
Mode for editing container.
@ DEMAND_PERSON
Mode for editing person.
@ DEMAND_VEHICLE
Mode for editing vehicles.
@ DEMAND_CONTAINERPLAN
Mode for editing container plan.
@ MID_COPY_TYPED_NAME
Copy typed object name - popup entry.
@ MID_OPEN_ADDITIONAL_DIALOG
open additional dialog (used in netedit)
@ MID_COPY_NAME
Copy object name - popup entry.
@ GLO_JPS_WALKABLEAREA
walkable area
@ GLO_PARENTCHILDLINE
line between parent and childrens
@ GLO_JPS_OBSTACLE
obstacles
GUIViewObjectsHandler gViewObjectsHandler
GUITexture
An enumeration of gifs used by the gui applications.
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_ACCESS
An access point for a train stop.
@ SUMO_TAG_PARKING_AREA_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_DET_ENTRY
an e3 entry point
@ SUMO_TAG_PARKING_SPACE
A parking space for a single vehicle within a parking area.
@ GNE_TAG_JPS_OBSTACLE
polygon used for draw juPedSim obstacles
@ SUMO_TAG_DET_EXIT
an e3 exit point
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
@ SUMO_TAG_TAZREL
a relation between two TAZs
@ GNE_TAG_JPS_WALKABLEAREA
polygon used for draw juPedSim walkable areas
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
bool isInitialised() const
check if Boundary is Initialised
Boundary & grow(double by)
extends the boundary by the given amount
std::string fromContainerStop
from containerStop
std::string toTrainStop
to trainStop
std::string fromTrainStop
from trainStop
std::string toParkingArea
to parkingArea
std::string fromBusStop
from busStop
std::string toBusStop
to busStop
std::string fromChargingStation
from chargingStation
std::string fromTAZ
from TAZ
std::string toChargingStation
to chargingStation
std::string fromParkingArea
from parkingArea
std::string toContainerStop
to containerStop
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void popMatrix()
pop matrix
static void drawBoundary(const GUIVisualizationSettings &s, const Boundary &b)
Draw a boundary (used for debugging)
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
static void drawFilledCircleDetailled(const GUIVisualizationSettings::Detail d, const double radius)
Draws a filled circle around (0,0) depending of level of detail.
static void pushMatrix()
push matrix
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, const int align=0, double width=-1)
bool checkDrawDeleteContour() const
check if draw delete contour (pink/white)
virtual const std::string getOptionalName() const
Returns the name of the object (default "")
virtual std::string getAttribute(SumoXMLAttr key) const =0
GNELane * getLastPathLane() const
get last path lane
bool isValidAdditionalID(const std::string &value) const
check if a new additional ID is valid
virtual void updateGeometry()=0
update pre-computed geometry information
void deleteGLObject()
delete element
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
void replaceAdditionalParent(SumoXMLTag tag, const std::string &value, const int parentIndex)
replace additional parent
static bool areLaneConnected(const std::vector< GNELane * > &lanes)
check if the given lanes are connected
void drawRightGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, const double rot, const RGBColor &baseColor, const bool ignoreShift=false) const
draw right geometry point
virtual bool isAdditionalValid() const =0
check if current additional is valid to be written into XML (by default true, can be reimplemented in...
virtual std::string getAdditionalProblem() const =0
return a string with the current additional problem (by default empty, can be reimplemented in childr...
std::string adjustListedAdditionalText(const std::string &text) const
adjust listed additional text
virtual void openAdditionalDialog()
open Additional Dialog
static std::string getJuPedSimType(SumoXMLTag tag)
get JuPedSim type
bool checkDrawSelectContour() const
check if draw select contour (blue)
void replaceAdditionalChildLanes(const std::string &value)
replace additional child lanes
void drawListedAdditional(const GUIVisualizationSettings &s, const Position &parentPosition, const double offsetX, const double extraOffsetY, const RGBColor baseCol, const RGBColor textCol, GUITexture texture, const std::string text) const
draw listed additional
void setAdditionalID(const std::string &newID)
set additional ID
GNEContour myAdditionalContour
variable used for draw additional contours
bool isPathElementSelected() const
check if path element is selected
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
bool checkDrawFromContour() const
check if draw from contour (green)
void replaceAdditionalParentEdges(const std::string &value)
replace additional parent edges
void drawAdditionalID(const GUIVisualizationSettings &s) const
draw additional ID
GNELane * getFirstPathLane() const
get first path lane
static FXIcon * getJuPedSimIcon(SumoXMLTag tag)
get JuPedSim icon
bool isValidDetectorID(const std::string &value) const
check if a new detector ID is valid
void drawUpGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, const double rot, const RGBColor &baseColor, const bool ignoreShift=false) const
draw up geometry point
void replaceAdditionalParentLanes(const std::string &value)
replace additional parent lanes
void shiftLaneIndex()
shift lane index
virtual Position getAttributePosition(SumoXMLAttr key) const
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
virtual GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GNEAdditional(const std::string &id, GNENet *net, GUIGlObjectType type, SumoXMLTag tag, FXIcon *icon, std::string additionalName, const std::vector< GNEJunction * > &junctionParents, const std::vector< GNEEdge * > &edgeParents, const std::vector< GNELane * > &laneParents, const std::vector< GNEAdditional * > &additionalParents, const std::vector< GNEDemandElement * > &demandElementParents, const std::vector< GNEGenericData * > &genericDataParents)
Constructor.
void calculatePerpendicularLine(const double endLaneposition)
calculate perpendicular line between lane parents
GNEMoveOperation * getMoveOperationMultiLane(const double startPos, const double endPos)
get moveOperation for an element over multi lane
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
std::string myAdditionalName
name of additional
void selectGLObject()
select element
void drawAdditionalName(const GUIVisualizationSettings &s) const
draw additional name
void resetAdditionalContour()
reset additional contour
void drawDemandElementChildren(const GUIVisualizationSettings &s) const
draw demand element children
static double getJuPedSimLayer(SumoXMLTag tag)
get JuPedSim color
void updateGLObject()
update GLObject (geometry, ID, etc.)
void setSpecialColor(const RGBColor *color)
set special color
const RGBColor * mySpecialColor
pointer to special color (used for drawing Additional with a certain color, mainly used for selection...
bool checkDrawToContour() const
check if draw from contour (magenta)
void drawSquaredAdditional(const GUIVisualizationSettings &s, const Position &pos, const double size, GUITexture texture, GUITexture selectedTexture) const
draw squared additional
bool drawMovingGeometryPoints(const bool ignoreShift) const
check if draw additional extrem geometry points
virtual bool checkChildAdditionalRestriction() const
check restriction with the number of children
void drawSemiCircleGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, const double rot, const RGBColor &baseColor, const double fromAngle, const double toAngle, const bool ignoreShift) const
draw geometry point
static bool areLaneConsecutives(const std::vector< GNELane * > &lanes)
check if the given lanes are consecutive
virtual void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over lane.
bool isGLObjectLocked() const
check if element is locked
void replaceAdditionalChildEdges(const std::string &value)
replace additional child edges
virtual void computePathElement()
compute pathElement
void calculateContourPolygons(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double layer, const double exaggeration, const bool filledShape) const
calculate contour for polygons
void drawDownGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, const double rot, const RGBColor &baseColor, const bool ignoreShift=false) const
draw down geometry point
static RGBColor getJuPedSimColor(SumoXMLTag tag)
get JuPedSim color
int getDrawPositionIndex() const
get draw position index (used in rerouters and VSS)
const GUIGeometry & getAdditionalGeometry() const
obtain additional geometry
Boundary myAdditionalBoundary
Additional Boundary (used only by additionals placed over grid)
void drawLeftGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, const double rot, const RGBColor &baseColor, const bool ignoreShift=false) const
draw left geometry point
void replaceDemandElementParent(SumoXMLTag tag, const std::string &value, const int parentIndex)
replace demand element parent
static bool getJuPedSimFill(SumoXMLTag tag)
get JuPedSim fill
~GNEAdditional()
Destructor.
const std::string & getOptionalAdditionalName() const
Returns the additional name.
GNEMoveOperation * getMoveOperationSingleLane(const double startPos, const double endPos)
get moveOperation for an element over single lane
virtual Position getPositionInView() const =0
Returns position of additional in view.
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position (Currently unused in shapes)
bool checkDrawRelatedContour() const
check if draw related contour (cyan)
static GUIGlObjectType getJuPedSimGLO(SumoXMLTag tag)
get GLO color
virtual void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over junction.
virtual void fixAdditionalProblem()=0
fix additional problem (by default throw an exception, has to be reimplemented in children)
void drawParentChildLines(const GUIVisualizationSettings &s, const RGBColor &color, const bool onlySymbols=false) const
draw parent and child lines
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void markAsFrontElement()
mark element as front element
bool checkDrawOverContour() const
check if draw over contour (orange)
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
FXIcon * getACIcon() const
get FXIcon associated to this AC
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
bool myIsTemplate
whether the current object is a template object (not drawn in the view)
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
bool isTemplate() const
check if this AC is template
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
GNENet * myNet
pointer to net
GNENet * getNet() const
get pointer to net
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
const GNETagProperties & myTagProperty
reference to tagProperty associated with this attribute carrier
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
calculate contour (for rectangled elements)
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
calculate contour extruded (used in elements formed by a central shape)
void clearContour() const
void clear contour
void calculateContourClosedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double scale) const
calculate contours
void 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...)
Boundary getContourBoundary() const
get contour boundary
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
A road/street connecting two junctions (netedit-version)
NBEdge * getNBEdge() const
returns the internal NBEdge
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
void replaceParentElements(T *elementChild, const U &newParents)
replace parent elements
void replaceChildElements(T *elementChild, const U &newChildren)
replace child elements
const std::vector< GNEGenericData * > & getChildGenericDatas() const
return child generic data elements
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getLaneShape() const
get elements shape
int getIndex() const
returns the index of the lane
GNEEdge * getParentEdge() const
get parent edge
bool getAllowChangeLane() const
allow change lane
bool getMoveWholePolygons() const
move whole polygons
NetworkModeOptions * getNetworkModeOptions() const
get network mode options
CommonModeOptions * getCommonModeOptions() const
get common mode options
@ MULTIPLE_LANES_MOVE_BOTH_LAST
@ MULTIPLE_LANES_MOVE_FIRST
@ MULTIPLE_LANES_MOVE_BOTH_FIRST
@ MULTIPLE_LANES_MOVE_LAST
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
void updateAdditionalID(GNEAdditional *additional, const std::string &newID)
update additional ID in container
GNEAdditional * retrieveAdditionals(const std::vector< SumoXMLTag > types, const std::string &id, bool hardFail=true) const
Returns the named additional.
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
void requireSaveDataElements()
inform that data elements has to be saved
void requireSaveDemandElements()
inform that demand elements has to be saved
A NBNetBuilder extended by visualisation and editing capabilities.
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
GNENetHelper::SavingStatus * getSavingStatus() const
get saving status
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEViewNet * getViewNet() const
get view net
const CommonXMLStructure::PlanParameters & getPlanParameteres() const
get plan parameters
bool markTAZs() const
check if mark TAZs with dotted contours
bool markStoppingPlaces() const
check if mark stoppingPlaces with dotted contours
SelectionInformation * getSelectionInformation() const
get modul for selection information
bool isTAZElement() const
return true if tag correspond to a TAZ element
bool isStoppingPlace() const
additional elements
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
bool isACInspected(GNEAttributeCarrier *AC) const
bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const
check if given GLObject is locked for inspect, select, delete and move
const GUIGlObject * getGUIGlObjectFront() const
get front GUIGLObject or a pointer to nullptr
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
const GNEAttributeCarrier * getFrontAttributeCarrier() const
get front attributeCarrier
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
void setFrontAttributeCarrier(GNEAttributeCarrier *AC)
set front attributeCarrier
const GNEViewNetHelper::MouseButtonKeyPressed & getMouseButtonKeyPressed() const
get Key Pressed module
GNEViewNetHelper::InspectedElements & getInspectedElements()
get inspected elements
void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier *AC, double typeOrLayer, const double extraOffset=0)
draw front attributeCarrier
GNEViewParent * getViewParent() const
get the net object
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
GNEUndoList * getUndoList() const
get the undoList object
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
GNEViewNetHelper::LockManager & getLockManager()
get lock manager
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
GNEMoveFrame * getMoveFrame() const
get frame for move elements
GNESelectorFrame * getSelectorFrame() const
get frame for select elements
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel, const bool disable=false)
build menu command
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
static void drawChildLine(const GUIVisualizationSettings &s, const Position &child, const Position &parent, const RGBColor &color, const bool drawEntire, const double lineWidth)
draw line between child and parent (used in netedit)
const PositionVector & getShape() const
The shape of the additional element.
void updateGeometry(const PositionVector &shape)
update entire geometry
static void drawParentLine(const GUIVisualizationSettings &s, const Position &parent, const Position &child, const RGBColor &color, const bool drawEntire, const double lineWidth)
draw line between parent and children (used in netedit)
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, const GUIMainWindow &app) const
Builds an entry which allows to copy the cursor position if geo projection is used,...
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
A window containing a gl-object's parameter.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
virtual Position getPositionInformation() const
Returns the cursor's x/y position within the network.
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
const GNESegment * getSelectedSegment(const GUIGlObject *GLObject) const
get segment associated with the given GLObject (if exist)
Stores the information about how to visualize structures.
GUIVisualizationTextSettings addName
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
GUIVisualizationSizeSettings addSize
bool checkDrawAdditional(Detail d, const bool selected) const
check if draw additionals
GUIVisualizationTextSettings addFullName
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
double scale
information about a lane's width (temporary, used for a single view)
bool drawForViewObjectsHandler
whether drawing is performed for the purpose of selecting objects in view using ViewObjectsHandler
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
double getTextAngle(double objectAngle) const
return an angle that is suitable for reading text aligned with the given angle (degrees)
GUIVisualizationNeteditSizeSettings neteditSizeSettings
netedit size settings
double getLaneWidth() const
Returns the default width of lanes of this edge.
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
void add(const Position &pos)
Adds the given position to this one.
double y() const
Returns the y-position.
double length2D() const
Returns the length.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
void move2side(double amount, double maxExtension=100)
move position vector to side using certain amount
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
static bool isValidAdditionalID(const std::string &value)
whether the given string is a valid id for an additional object
static bool isValidDetectorID(const std::string &value)
whether the given string is a valid id for an detector
static const std::string format(const std::string &format, T value, Targs... Fargs)
adds a new formatted message
bool showAdditionals() const
check if additionals has to be drawn
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
static bool checkDrawing(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const double exaggeration)
check if icon can be drawn
static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position position, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
static const RGBColor connectionColor
connection color
static const RGBColor connectionColorSelected
connection color selected
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
static const double segmentWidth
width of dotted contour segments
static const double polygonGeometryPointRadius
moving geometry point radius
static const double additionalGeometryPointRadius
moving additional geometry point radius
static const double polylineWidth
poly line width
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
bool show(const GUIGlObject *o) const
whether to show the text
double scaledSize(double scale, double constFactor=0.1) const
get scale size