Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEAdditionalFrame.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// The Widget for add additional elements
19/****************************************************************************/
20
22#include <netedit/GNENet.h>
31
32#include "GNEAdditionalFrame.h"
33
34// ===========================================================================
35// method definitions
36// ===========================================================================
37
38// ---------------------------------------------------------------------------
39// GNEAdditionalFrame::E2MultilaneLegendModule - methods
40// ---------------------------------------------------------------------------
41
43 MFXGroupBoxModule(frameParent, TL("Legend")) {
44 // declare label
45 FXLabel* legendLabel = nullptr;
46 // edge candidate
47 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge candidate"), 0, GUIDesignLabel(JUSTIFY_LEFT));
49 legendLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE));
50 // last edge selected
51 legendLabel = new FXLabel(getCollapsableFrame(), TL(" last edge selected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
52 legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.target));
53 // edge selected
54 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge selected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
55 legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.source));
56 // edge disconnected
57 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge disconnected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
59}
60
61
63
64
65void
69
70
71void
75
76// ---------------------------------------------------------------------------
77// GNEAdditionalFrame::HelpCreationModule - methods
78// ---------------------------------------------------------------------------
79
81 MFXGroupBoxModule(frameParent, TL("Help")) {
82 // edge candidate
84 // fill map
85 //addTLString(TL("-Requires EntryExitDetector\n")) +
86 // E1
87 myHelpMap[SUMO_TAG_INDUCTION_LOOP] = addTLString(TL("-Click over lane to create it"));
88 // E1 Instant
89 myHelpMap[SUMO_TAG_INSTANT_INDUCTION_LOOP] = addTLString(TL("-Click over lane to create it"));
90 // E2
91 myHelpMap[SUMO_TAG_LANE_AREA_DETECTOR] = addTLString(TL("-Click over lane to create it"));
92 // E3
93 myHelpMap[SUMO_TAG_ENTRY_EXIT_DETECTOR] = addTLString(TL("-Click over view to create it")) +
94 addTLString(TL("-Requires at least one Entry\n and one Exit"));
95 // E3 Entry
96 myHelpMap[SUMO_TAG_DET_ENTRY] = addTLString(TL("-Requires EntryExitDetector\n parent\n")) +
97 addTLString(TL("-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
98 // E3 Exit
99 myHelpMap[SUMO_TAG_DET_EXIT] = addTLString(TL("-Requires EntryExitDetector\n parent\n")) +
100 addTLString(TL("-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
101}
102
103
105
106
107void
109 if (myHelpMap.count(XMLTag) > 0) {
110 myHelpLabel->setText(myHelpMap.at(XMLTag).c_str());
111 show();
112 } else {
113 hide();
114 }
115}
116
117
118void
122
123
124std::string
126 return std::string(str.c_str());
127}
128
129// ---------------------------------------------------------------------------
130// GNEAdditionalFrame: - methods
131// ---------------------------------------------------------------------------
132
134 GNEFrame(viewParent, viewNet, TL("Additionals")) {
135
136 // create item Selector module for additionals
138
139 // Create additional parameters
141
142 // Create selector parent
144
145 // Create selector child edges
147
148 // Create list for E2Multilane lane selector
150
151 // create help creation module
153
154 // Create legend for E2 detector
156}
157
158
160 // check if we have to delete base additional object
161 if (myBaseAdditional) {
162 delete myBaseAdditional;
163 }
164}
165
166
167void
169 // refresh tag selector
171 // reset last position
173 // show frame
175}
176
177
178bool
180 // first check that current selected additional is valid
182 myViewNet->setStatusBarText(TL("Current selected additional isn't valid."));
183 return false;
184 }
185 // obtain tagproperty (only for improve code legibility)
186 const auto& tagProperties = myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
187 // check if toogle selection
188 if ((viewObjects.getAttributeCarrierFront() == viewObjects.getLaneFront()) &&
190 return true;
191 }
193 return true;
194 }
195 // check if add a lane in consecutive lane selector
196 if (tagProperties->getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
197 return myConsecutiveLaneSelector->addLane(viewObjects.getLaneFront());
198 }
199 // disable rerouter elements (temporal)
200 if ((tagProperties->getTag() == SUMO_TAG_INTERVAL) ||
201 (tagProperties->getTag() == SUMO_TAG_DEST_PROB_REROUTE) ||
202 (tagProperties->getTag() == SUMO_TAG_CLOSING_REROUTE) ||
203 (tagProperties->getTag() == SUMO_TAG_CLOSING_LANE_REROUTE) ||
204 (tagProperties->getTag() == SUMO_TAG_ROUTE_PROB_REROUTE) ||
205 (tagProperties->getTag() == SUMO_TAG_PARKING_AREA_REROUTE)) {
206 WRITE_WARNING(TL("Currently unsupported. Create rerouter elements using rerouter dialog"));
207 return false;
208 }
209 // disable steps (temporal)
210 if (tagProperties->getTag() == SUMO_TAG_STEP) {
211 WRITE_WARNING(TL("Currently unsupported. Create VSS steps using VSS dialog"));
212 return false;
213 }
214 // disable flows (temporal)
215 if (tagProperties->getTag() == GNE_TAG_CALIBRATOR_FLOW) {
216 WRITE_WARNING(TL("Currently unsupported. Create calibratorFlows using calibrator dialog"));
217 return false;
218 }
219 // check last position
221 WRITE_WARNING(TL("Shift + click to create two additionals in the same position"));
222 return false;
223 }
224 // check if additional attributes are valid
226 return false;
227 }
228 // reset base additional
230 // init base additional object
231 if (!initBaseAdditionalObject(tagProperties, viewObjects)) {
232 return false;
233 }
234 // parse common attributes
236 return false;
237 }
238 // add basic attributes and values
240 // declare additional handler
244 // build additional
245 additionalHandler.parseSumoBaseObject(myBaseAdditional);
246 // Refresh additional Parent Selector (For additionals that have a limited number of children)
248 // clear selected view objects
251 return true;
252}
253
254
259
260
265
266
271
272
277
278
279bool
280GNEAdditionalFrame::createPath(const bool /* useLastRoute */) {
281 // obtain tagproperty (only for improve code legibility)
282 const auto tagProperty = myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
283 // first check that current tag is valid (currently only for E2 multilane detectors)
284 if (tagProperty->getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
285 // now check number of lanes
286 if (myConsecutiveLaneSelector->getLanePath().size() < 2) {
287 WRITE_WARNING(TL("E2 multilane detectors need at least two consecutive lanes"));
288 } else {
289 // reset base object
291 // set tag
293 // get attributes and values
295 // add lane IDs
297 // set positions
300 // parse common attributes
302 // show warning dialogbox and stop check if input parameters are valid
304 // declare additional handler
308 // build additional
309 additionalHandler.parseSumoBaseObject(myBaseAdditional);
310 // Refresh additional Parent Selector (For additionals that have a limited number of children)
312 // abort E2 creation
314 return true;
315 }
316 }
317 }
318 }
319 return false;
320}
321
322
323void
325 // get template AC
326 const auto templateAC = myAdditionalTagSelector->getCurrentTemplateAC();
327 if (templateAC) {
328 // show parameters
330 // Show myAdditionalFrameParent if we're adding an slave element
331 if (templateAC->getTagProperty()->isChild()) {
332 mySelectorAdditionalParent->showSelectorParentModule(templateAC->getTagProperty()->getXMLParentTags());
333 } else {
335 }
336 // Show EdgesSelector if we're adding an additional that own the attribute SUMO_ATTR_EDGES
337 if (templateAC->getTagProperty()->hasAttribute(SUMO_ATTR_EDGES)) {
339 } else {
341 }
342 // show help creation modul
343 myHelpCreationModule->showHelpCreationModule(templateAC->getTagProperty()->getTag());
344 // check if we must show consecutive lane selector
345 if (templateAC->getTagProperty()->getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
349 // recompute network
351 } else if (templateAC->getTagProperty()->hasAttribute(SUMO_ATTR_LANES)) {
355 } else {
358 }
359 // reset last position
361 } else {
362 // hide all modules if additional isn't valid
369 }
370}
371
372
373void
375 // check if baseAdditional exist, and if yes, delete it
376 if (myBaseAdditional) {
377 // go to base additional root
380 }
381 // delete baseAdditional (and all children)
382 delete myBaseAdditional;
383 // reset baseAdditional
384 myBaseAdditional = nullptr;
385 }
386 // create an new base additional
388}
389
390
391bool
393 // declare tag for base additional
394 auto baseAdditionalTag = tagProperty->getTag();
395 // check if tag has to be updated
396 if (baseAdditionalTag == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
397 baseAdditionalTag = SUMO_TAG_LANE_AREA_DETECTOR;
398 } else if (baseAdditionalTag == GNE_TAG_CALIBRATOR_FLOW) {
399 baseAdditionalTag = SUMO_TAG_FLOW;
400 }
401 // update view objects parents
403 // check if additional is child of other element
404 if (tagProperty->isChild()) {
405 // check if we clicked over a parent
406 SumoXMLTag parentTag = SUMO_TAG_NOTHING;
407 for (const auto& pTag : tagProperty->getXMLParentTags()) {
408 if (myBaseAdditional->hasParentID(pTag)) {
409 parentTag = pTag;
410 }
411 }
412 // update selector additional parent
413 if (parentTag != SUMO_TAG_NOTHING) {
414 // update parent additional selected
416 }
417 // continue depending of parents
419 std::string messageError = toString(tagProperty->getXMLParentTags().front());
420 if (tagProperty->getXMLParentTags().size() > 1) {
421 const int numParents = (int)tagProperty->getXMLParentTags().size();
422 messageError.clear();
423 for (int i = 0; i < numParents; i++) {
424 messageError.append(toString(tagProperty->getXMLParentTags().at(i)));
425 if (i == numParents - 2) {
426 messageError.append(" or ");
427 } else if (i < (numParents - 2)) {
428 messageError.append(", ");
429 }
430 }
431 }
432 WRITE_WARNING(TLF("A % must be selected before insertion of %.", messageError, tagProperty->getTagStr()));
433 return false;
434 } else {
435 // set parent tag // POSSIBLE ERROR WITH ACCESS AND BUSSTOPS!
436 myBaseAdditional->setTag(tagProperty->getXMLParentTags().front());
437 // add ID
439 // create base additional again as child of current base additional
441 }
442 }
443 // set baseAdditional tag
444 myBaseAdditional->setTag(baseAdditionalTag);
445 // Obtain position as the clicked position over view
447 // add position and X-Y-Z attributes
452 // check if add edge attributes
453 if (tagProperty->hasAttribute(SUMO_ATTR_EDGE)) {
454 if (viewObjects.getEdgeFront() == nullptr) {
455 return false;
456 } else {
458 // Obtain position of the mouse over lane (limited over grid)
459 const auto firstLane = viewObjects.getEdgeFront()->getChildLanes().front();
460 const double mousePositionOverLane = firstLane->getLaneShape().nearest_offset_to_point2D(viewPosSnapped) / firstLane->getLengthGeometryFactor();
462 }
463 } else if (tagProperty->getTag() == SUMO_TAG_VAPORIZER) {
464 // special case for vaporizers
465 if (viewObjects.getEdgeFront() == nullptr) {
466 return false;
467 } else {
469 }
470 }
471 // check if add lane attributes
472 if (tagProperty->hasAttribute(SUMO_ATTR_LANE)) {
473 if (viewObjects.getLaneFront() == nullptr) {
474 return false;
475 } else {
478 // Obtain position of the mouse over lane (limited over grid)
479 const double mousePositionOverLane = viewObjects.getLaneFront()->getLaneShape().nearest_offset_to_point2D(viewPosSnapped) / viewObjects.getLaneFront()->getLengthGeometryFactor();
480 // special case for access
481 if (tagProperty->getTag() == SUMO_TAG_ACCESS) {
483 } else {
485 }
486 }
487 }
488 // BaseAdditional created, then return true
489 return true;
490}
491
492/****************************************************************************/
#define GUIDesignLabel(justify)
Definition GUIDesigns.h:245
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition GUIDesigns.h:281
#define WRITE_WARNING(msg)
Definition MsgHandler.h:286
#define TL(string)
Definition MsgHandler.h:304
#define TLF(string,...)
Definition MsgHandler.h:306
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ GNE_TAG_MULTI_LANE_AREA_DETECTOR
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_ACCESS
An access point for a train stop.
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ SUMO_TAG_PARKING_AREA_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_STEP
trigger: a step description
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
@ SUMO_TAG_DET_ENTRY
an e3 entry point
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_INSTANT_INDUCTION_LOOP
An instantenous induction loop.
@ GNE_TAG_CALIBRATOR_FLOW
a flow definition within in Calibrator
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destination of a reroute
@ SUMO_TAG_DET_EXIT
an e3 exit point
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
@ SUMO_TAG_LANE_AREA_DETECTOR
alternative tag for e2 detector
@ SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for e3 detector
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_LANE
@ SUMO_ATTR_Y
@ SUMO_ATTR_Z
@ SUMO_ATTR_EDGE
@ SUMO_ATTR_ENDPOS
@ SUMO_ATTR_X
@ SUMO_ATTR_EDGES
the edges of a route
@ GNE_ATTR_ADDITIONAL_FILE
additional save file
@ SUMO_ATTR_LANES
@ SUMO_ATTR_ID
@ GNE_ATTR_LANELENGTH
size (used in stopping places)
@ SUMO_ATTR_POSITION
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
bool hasParentID(const SumoXMLTag tag) const
check if current SumoBaseObject has the given parent ID
bool hasStringAttribute(const SumoXMLAttr attr) const
has function
void setTag(const SumoXMLTag tag)
set SumoBaseObject tag
SumoBaseObject * getParentSumoBaseObject() const
get pointer to mySumoBaseObjectParent SumoBaseObject (if is null, then is the root)
const std::string & getParentID(const SumoXMLTag tag) const
get parent ID
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
void addDoubleAttribute(const SumoXMLAttr attr, const double value)
add double attribute into current SumoBaseObject node
void addPositionAttribute(const SumoXMLAttr attr, const Position &value)
add Position attribute into current SumoBaseObject node
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
add string attribute into current SumoBaseObject node
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
E2MultilaneLegendModule(GNEFrame *frameParent)
constructor
std::map< SumoXMLTag, std::string > myHelpMap
map with tags and their associated help
std::string addTLString(const std::string &str)
add translated string
void showHelpCreationModule(SumoXMLTag XMLTag)
show Legend modul
HelpCreationModule(GNEFrame *frameParent)
constructor
GNESelectorParent * mySelectorAdditionalParent
Module for select a single parent additional.
GNETagSelector * getAdditionalTagSelector() const
get additional tag selector
bool initBaseAdditionalObject(const GNETagProperties *tagProperty, const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
GNEConsecutiveSelector * getConsecutiveLaneSelector() const
get consecutive lane selector
GNEAttributesEditor * getAttributesEditor() const
get attribtues editor
GNETagSelector * myAdditionalTagSelector
item selector
GNEAttributesEditor * myAdditionalAttributesEditor
additional attributes editor
bool createPath(const bool useLastRoute)
create path
GNEAdditionalFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
bool addAdditional(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add additional element
E2MultilaneLegendModule * myE2MultilaneLegendModule
Module for show E2 Detector legend.
void tagSelected()
Tag selected in GNETagSelector.
GNEViewObjectSelector * getViewObjetsSelector() const
get module for select view objects
HelpCreationModule * myHelpCreationModule
Module for show additional help legend.
GNEViewObjectSelector * myViewObjetsSelector
Module for select view objects.
Position myLastClickedPosition
last clicked position
CommonXMLStructure::SumoBaseObject * myBaseAdditional
SumoBaseObject used for create additional.
GNEConsecutiveSelector * myConsecutiveLaneSelector
Module for select consecutive lanes.
const std::string getID() const override
get ID (all Attribute Carriers have one)
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
SumoXMLAttr fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObject) const
fill sumo Base object
void showAttributesEditor(GNEAttributeCarrier *AC, const bool primaryAttributeEditor)
edit attributes of the given AC (usually the edited template AC)
void refreshAttributesEditor()
refresh attribute editor
bool checkAttributes(const bool showWarning)
check if current edited attributes are valid
void hideAttributesEditor()
hide attribute editor
bool addLane(GNELane *lane)
add lane
void abortPathCreation()
abort path creation
void showConsecutiveLaneSelectorModule()
show GNEConsecutiveSelector
const std::vector< std::pair< GNELane *, double > > & getLanePath() const
get vector with lanes and clicked positions
void hideConsecutiveLaneSelectorModule()
show GNEConsecutiveSelector
const std::vector< std::string > getLaneIDPath() const
get lane IDs
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:145
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:122
virtual void show()
show Frame
Definition GNEFrame.cpp:110
virtual void hide()
hide Frame
Definition GNEFrame.cpp:119
const GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
const PositionVector & getLaneShape() const
get elements shape
Definition GNELane.cpp:232
double getLengthGeometryFactor() const
get length geometry factor
Definition GNELane.cpp:1965
double getLaneShapeLength() const
returns the length of the lane's shape
Definition GNELane.cpp:654
void computeNetwork(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false)
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
Definition GNENet.cpp:1460
void setIDSelected(const std::string &id)
select manually a element of the list
void showSelectorParentModule(const std::vector< SumoXMLTag > &parentTags)
Show list of GNESelectorParent Module.
void refreshSelectorParentModule()
Refresh list of Additional Parents Module.
std::string getIdSelected() const
get currently parent additional selected
void hideSelectorParentModule()
hide GNESelectorParent Module
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
bool isChild() const
properties
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
const std::vector< SumoXMLTag > & getXMLParentTags() const
get XML parent tags
void refreshTagSelector()
refresh tagSelector (used when frameParent is show)
GNEAttributeCarrier * getCurrentTemplateAC() const
get current templateAC
class used to group all variables related with objects under cursor after a click over view
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
void fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObjet) const
fill the given SUMO base object with the current single objects
GNENet * getNet() const
get the net object
const GNEViewNetHelper::MouseButtonKeyPressed & getMouseButtonKeyPressed() const
get Key Pressed module
GNEViewParent * getViewParent() const
get the net object
void setStatusBarText(const std::string &text)
set statusBar text
bool fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObject) const
@brie fill SUMO base object
void showNetworkElementsSelector(const SumoXMLTag tag, const SumoXMLAttr attribute)
show GNEViewObjectSelector Module
void clearSelection()
clear selection
bool toggleSelectedLane(const GNELane *lane)
toggle selected lane
void hideNetworkElementsSelector()
hide GNEViewObjectSelector Module
bool toggleSelectedElement(const GNEAttributeCarrier *AC)
toggle selected element
A single child window which contains a view of the simulation area.
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
virtual Position getPositionInformation() const
Returns the cursor's x/y position within the network.
GUIVisualizationCandidateColorSettings candidateColorSettings
candidate color settings
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition MFXUtils.cpp:145
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
static const Position INVALID
used to indicate that a position is valid
Definition Position.h:323
double x() const
Returns the x-position.
Definition Position.h:52
double z() const
Returns the z-position.
Definition Position.h:62
double y() const
Returns the y-position.
Definition Position.h:57
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
static const RGBColor WHITE
Definition RGBColor.h:195
bool shiftKeyPressed() const
check if SHIFT is pressed during current event
static const RGBColor conflict
color for selected conflict candidate element (Usually selected using ctrl+click)
static const RGBColor target
color for selected candidate target
static const RGBColor possible
color for possible candidate element
static const RGBColor source
color for selected candidate source