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-2023 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#include <config.h>
21
22#include <netedit/GNENet.h>
23#include <netedit/GNEViewNet.h>
27
28#include "GNEAdditionalFrame.h"
29
30
31// ===========================================================================
32// method definitions
33// ===========================================================================
34
36 GNEFrame(viewParent, viewNet, "Additionals") {
37
38 // create item Selector module for additionals
40
41 // Create additional parameters
43
44 // Create netedit parameter
46
47 // Create selector parent
49
50 // Create selector child edges
52
53 // Create selector child lanes
55
56 // Create list for E2Multilane lane selector
58
59 // Create legend for E2 detector
61}
62
63
65 // check if we have to delete base additional object
66 if (myBaseAdditional) {
67 delete myBaseAdditional;
68 }
69}
70
71
72void
74 // refresh tag selector
76 // reset last position
78 // show frame
80}
81
82
83bool
85 // first check that current selected additional is valid
87 myViewNet->setStatusBarText(TL("Current selected additional isn't valid."));
88 return false;
89 }
90 // check if add or remove edge
91 if (myEdgesSelector->isShown() && objectsUnderCursor.getEdgeFront()) {
93 return true;
94 }
95 // check if add or remove lane
96 if (myLanesSelector->isShown() && objectsUnderCursor.getLaneFront()) {
98 return true;
99 }
100 // show warning dialogbox and stop check if input parameters are valid
103 return false;
104 }
105 // obtain tagproperty (only for improve code legibility)
106 const auto& tagProperties = myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
107 // create base additional
108 if (!createBaseAdditionalObject(tagProperties)) {
109 return false;
110 }
111 // obtain attributes and values
113 // fill netedit attributes
115 return false;
116 }
117 // If consecutive Lane Selector is enabled, it means that either we're selecting lanes or we're finished or we'rent started
118 if (tagProperties.hasAttribute(SUMO_ATTR_EDGE) || (tagProperties.getTag() == SUMO_TAG_VAPORIZER)) {
119 return buildAdditionalOverEdge(objectsUnderCursor.getLaneFront(), tagProperties);
120 } else if (tagProperties.hasAttribute(SUMO_ATTR_LANE)) {
121 return buildAdditionalOverLane(objectsUnderCursor.getLaneFront(), tagProperties);
122 } else if (tagProperties.getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
123 return myConsecutiveLaneSelector->addLane(objectsUnderCursor.getLaneFront());
124 } else {
125 return buildAdditionalOverView(tagProperties);
126 }
127}
128
129
134
135
140
141
146
147
148bool
149GNEAdditionalFrame::createPath(const bool /* useLastRoute */) {
150 // obtain tagproperty (only for improve code legibility)
151 const auto& tagProperty = myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
152 // first check that current tag is valid (currently only for E2 multilane detectors)
153 if (tagProperty.getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
154 // now check number of lanes
155 if (myConsecutiveLaneSelector->getLanePath().size() < 2) {
156 WRITE_WARNING(TL("E2 multilane detectors need at least two consecutive lanes"));
157 } else if (createBaseAdditionalObject(tagProperty)) {
158 // get attributes and values
160 // fill netedit attributes
162 // Check if ID has to be generated
165 }
166 // add lane IDs
168 // set positions
171 // parse common attributes
172 if (buildAdditionalCommonAttributes(tagProperty)) {
173 // show warning dialogbox and stop check if input parameters are valid
174 if (myAdditionalAttributes->areValuesValid() == false) {
176 } else {
177 // declare additional handler
178 GNEAdditionalHandler additionalHandler(getViewNet()->getNet(), true, false);
179 // build additional
180 additionalHandler.parseSumoBaseObject(myBaseAdditional);
181 // Refresh additional Parent Selector (For additionals that have a limited number of children)
183 // abort E2 creation
185 // refresh additional attributes
187 return true;
188 }
189 }
190 }
191 }
192 }
193 return false;
194}
195
196
197void
199 // get template AC
200 const auto templateAC = myAdditionalTagSelector->getCurrentTemplateAC();
201 if (templateAC) {
202 // show additional attributes module
204 // show netedit attributes
206 // Show myAdditionalFrameParent if we're adding an slave element
207 if (templateAC->getTagProperty().isChild()) {
208 mySelectorAdditionalParent->showSelectorParentModule(templateAC->getTagProperty().getParentTags());
209 } else {
211 }
212 // Show EdgesSelector if we're adding an additional that own the attribute SUMO_ATTR_EDGES
213 if (templateAC->getTagProperty().hasAttribute(SUMO_ATTR_EDGES)) {
215 } else {
217 }
218 // check if we must show consecutive lane selector
219 if (templateAC->getTagProperty().getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
223 // recompute network
225 } else if (templateAC->getTagProperty().hasAttribute(SUMO_ATTR_LANES)) {
229 } else {
233 }
234 // reset last position
236 } else {
237 // hide all modules if additional isn't valid
245 }
246}
247
248
249bool
251 // check if baseAdditional exist, and if yes, delete it
252 if (myBaseAdditional) {
253 // go to base additional root
256 }
257 // delete baseAdditional (and all children)
258 delete myBaseAdditional;
259 // reset baseAdditional
260 myBaseAdditional = nullptr;
261 }
262 // declare tag for base additional
263 SumoXMLTag baseAdditionalTag = tagProperty.getTag();
264 // check if baseAdditionalTag has to be updated
265 if (baseAdditionalTag == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
266 baseAdditionalTag = SUMO_TAG_LANE_AREA_DETECTOR;
267 } else if (baseAdditionalTag == GNE_TAG_CALIBRATOR_FLOW) {
268 baseAdditionalTag = SUMO_TAG_FLOW;
269 }
270 // check if additional is child
271 if (tagProperty.isChild()) {
272 // get additional under cursor
273 const GNEAdditional* additionalUnderCursor = myViewNet->getObjectsUnderCursor().getAdditionalFront();
274 // if user click over an additional element parent, mark int in ParentAdditionalSelector
275 if (additionalUnderCursor && (additionalUnderCursor->getTagProperty().getTag() == tagProperty.getParentTags().front())) {
276 // update parent additional selected
277 mySelectorAdditionalParent->setIDSelected(additionalUnderCursor->getID());
278 }
279 // stop if currently there isn't a valid selected parent
282 TL(" must be selected before insertion of ") + myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty().getTagStr() + ".");
283 return false;
284 } else {
285 // create baseAdditional parent
287 // set parent tag
288 myBaseAdditional->setTag(tagProperty.getParentTags().front());
289 // add ID
291 // create baseAdditional again as child of current myBaseAdditional
293 }
294 } else {
295 // just create a base additional
297 }
298 // set baseAdditional tag
299 myBaseAdditional->setTag(baseAdditionalTag);
300 // BaseAdditional created, then return true
301 return true;
302}
303
304
305bool
307 // If additional has a interval defined by a begin or end, check that is valid
308 if (tagProperties.hasAttribute(SUMO_ATTR_STARTTIME) && tagProperties.hasAttribute(SUMO_ATTR_END)) {
311 if (begin > end) {
312 myAdditionalAttributes->showWarningMessage(TL("Attribute '") + toString(SUMO_ATTR_STARTTIME) + TL("' cannot be greater than attribute '") + toString(SUMO_ATTR_END) + "'.");
313 return false;
314 }
315 }
316 // If additional own the attribute SUMO_ATTR_FILE but was't defined, will defined as <ID>.xml
319 // SUMO_ATTR_FILE is optional for calibrators and rerouters (fails to load in sumo when given and the file does not exist)
321 }
322 }
323 // check edge children
325 // obtain edge IDs
327 // check if attribute has at least one edge
329 myAdditionalAttributes->showWarningMessage(TL("List of edges cannot be empty"));
330 return false;
331 }
332 }
333 // check lane children
335 // obtain lane IDs
337 // check if attribute has at least one lane
339 myAdditionalAttributes->showWarningMessage(TL("List of lanes cannot be empty"));
340 return false;
341 }
342 }
343 // all ok, continue building additional
344 return true;
345}
346
347
348bool
350 // check that lane exist
351 if (lane) {
352 // Get attribute lane's edge
354 // Check if ID has to be generated
355 if (tagProperties.getTag() == SUMO_TAG_VAPORIZER) {
359 }
360 } else {
361 return false;
362 }
363 // parse common attributes
364 if (!buildAdditionalCommonAttributes(tagProperties)) {
365 return false;
366 }
367 // show warning dialogbox and stop check if input parameters are valid
370 return false;
371 } else {
372 // declare additional handler
373 GNEAdditionalHandler additionalHandler(myViewNet->getNet(), true, false);
374 // build additional
375 additionalHandler.parseSumoBaseObject(myBaseAdditional);
376 // Refresh additional Parent Selector (For additionals that have a limited number of children)
378 // clear selected edges and lanes
379 myEdgesSelector->onCmdClearSelection(nullptr, 0, nullptr);
380 myLanesSelector->onCmdClearSelection(nullptr, 0, nullptr);
381 // refresh additional attributes
383 return true;
384 }
385}
386
387
388bool
390 // check that lane exist
391 if (lane != nullptr) {
392 // Get attribute lane
394 // Check if ID has to be generated
397 }
398 } else {
399 return false;
400 }
401 // Obtain position of the mouse over lane (limited over grid)
403 // set attribute position as mouse position over lane
405 // parse common attributes
406 if (!buildAdditionalCommonAttributes(tagProperties)) {
407 return false;
408 }
409 // show warning dialogbox and stop check if input parameters are valid
412 return false;
413 } else {
414 // declare additional handler
415 GNEAdditionalHandler additionalHandler(myViewNet->getNet(), true, false);
416 // build additional
417 additionalHandler.parseSumoBaseObject(myBaseAdditional);
418 // Refresh additional Parent Selector (For additionals that have a limited number of children)
420 // clear selected edges and lanes
421 myEdgesSelector->onCmdClearSelection(nullptr, 0, nullptr);
422 myLanesSelector->onCmdClearSelection(nullptr, 0, nullptr);
423 // refresh additional attributes
425 return true;
426 }
427}
428
429
430bool
432 // disable intervals (temporal)
433 if ((tagProperties.getTag() == SUMO_TAG_INTERVAL) ||
434 (tagProperties.getTag() == SUMO_TAG_DEST_PROB_REROUTE) ||
435 (tagProperties.getTag() == SUMO_TAG_CLOSING_REROUTE) ||
436 (tagProperties.getTag() == SUMO_TAG_CLOSING_LANE_REROUTE) ||
437 (tagProperties.getTag() == SUMO_TAG_ROUTE_PROB_REROUTE) ||
438 (tagProperties.getTag() == SUMO_TAG_PARKING_AREA_REROUTE)) {
439 WRITE_WARNING(TL("Currently unsupported. Create rerouter elements using rerouter dialog"));
440 return false;
441 }
442 // disable steps (temporal)
443 if (tagProperties.getTag() == SUMO_TAG_STEP) {
444 WRITE_WARNING(TL("Currently unsupported. Create VSS steps using VSS dialog"));
445 return false;
446 }
447 // disable flows (temporal)
448 if (tagProperties.getTag() == GNE_TAG_CALIBRATOR_FLOW) {
449 WRITE_WARNING(TL("Currently unsupported. Create calibratorFlows using calibrator dialog"));
450 return false;
451 }
452 // Check if ID has to be generated
455 }
456 // Obtain position as the clicked position over view
458 // add position and X-Y-Z attributes
463 // parse common attributes
464 if (!buildAdditionalCommonAttributes(tagProperties)) {
465 return false;
466 }
467 // special case for VSS Steps
469 // get VSS parent
472 // get last step
473 GNEAdditional* step = nullptr;
474 for (const auto& additionalChild : VSSParent->getChildAdditionals()) {
475 if (!additionalChild->getTagProperty().isSymbol()) {
476 step = additionalChild;
477 }
478 }
479 // set time
480 if (step) {
482 } else {
484 }
485 }
486 // show warning dialogbox and stop check if input parameters are valid
487 if (myAdditionalAttributes->areValuesValid() == false) {
489 return false;
490 } else {
491 // declare additional handler
492 GNEAdditionalHandler additionalHandler(myViewNet->getNet(), true, false);
493 // build additional
494 additionalHandler.parseSumoBaseObject(myBaseAdditional);
495 // Refresh additional Parent Selector (For additionals that have a limited number of children)
497 // clear selected edges and lanes
498 myEdgesSelector->onCmdClearSelection(nullptr, 0, nullptr);
499 myLanesSelector->onCmdClearSelection(nullptr, 0, nullptr);
500 // refresh additional attributes
502 return true;
503 }
504}
505
506/****************************************************************************/
#define WRITE_WARNING(msg)
Definition MsgHandler.h:270
#define TL(string)
Definition MsgHandler.h:287
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
Definition SUMOTime.cpp:46
#define TIME2STEPS(x)
Definition SUMOTime.h:57
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ SUMO_TAG_REROUTER
A rerouter.
@ GNE_TAG_MULTI_LANE_AREA_DETECTOR
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ 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
@ GNE_TAG_CALIBRATOR_FLOW
a flow definition within in Calibrator
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destination of a reroute
@ 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_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_VSS
A variable speed sign.
@ SUMO_ATTR_LANE
@ SUMO_ATTR_FILE
@ SUMO_ATTR_Y
@ SUMO_ATTR_Z
@ SUMO_ATTR_EDGE
@ SUMO_ATTR_ENDPOS
@ SUMO_ATTR_X
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_LANES
@ SUMO_ATTR_STARTTIME
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_ID
@ SUMO_ATTR_POSITION
@ SUMO_ATTR_TIME
trigger: the time of the step
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 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)
void addTimeAttribute(const SumoXMLAttr attr, const SUMOTime value)
add time attribute into current SumoBaseObject node
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)
double getDoubleAttribute(const SumoXMLAttr attr) const
get double attribute
const std::vector< std::string > & getStringListAttribute(const SumoXMLAttr attr) const
get string list attribute
bool hasStringListAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given string list attribute
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
GNESelectorParent * mySelectorAdditionalParent
Module for select a single parent additional.
bool buildAdditionalOverLane(GNELane *lane, const GNETagProperties &tagValues)
build additional over a single lane
GNEConsecutiveSelector * getConsecutiveLaneSelector() const
get consecutive lane selector
GNETagSelector * myAdditionalTagSelector
item selector
GNENetworkSelector * getLanesSelector() const
get edges selector
bool createPath(const bool useLastRoute)
create path
GNEAdditionalFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
GNENetworkSelector * getEdgesSelector() const
get edges selector
void tagSelected()
Tag selected in GNETagSelector.
GNENetworkSelector * myLanesSelector
Module for select lanes.
bool buildAdditionalOverView(const GNETagProperties &tagValues)
build additional over view
bool buildAdditionalCommonAttributes(const GNETagProperties &tagValues)
build common additional attributes
GNEAttributesCreator * myAdditionalAttributes
internal additional attributes
~GNEAdditionalFrame()
Destructor.
GNENetworkSelector * myEdgesSelector
Module for select edges.
CommonXMLStructure::SumoBaseObject * myBaseAdditional
SumoBaseObject used for create additional.
bool addAdditional(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add additional element
bool createBaseAdditionalObject(const GNETagProperties &tagProperty)
GNENeteditAttributes * myNeteditAttributes
Netedit parameter.
bool buildAdditionalOverEdge(GNELane *lane, const GNETagProperties &tagValues)
build additional over an edge (parent of lane)
GNEConsecutiveSelector * myConsecutiveLaneSelector
Module for select consecutive lanes.
GNEE2DetectorLegendModule * myE2DetectorLegendModule
Module for show E2 Detector legend.
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
An Element which don't belong to GNENet but has influence in the simulation.
virtual std::string getAttribute(SumoXMLAttr key) const =0
const std::string getID() const
get ID (all Attribute Carriers have one)
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
void getAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, bool includeAll) const
get attributes and their values
bool areValuesValid() const
check if parameters of attributes are valid
void showAttributesCreatorModule(GNEAttributeCarrier *templateAC, const std::vector< SumoXMLAttr > &hiddenAttributes)
show GNEAttributesCreator modul
void hideAttributesCreatorModule()
hide group box
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
void refreshAttributesCreator()
refresh attribute creator
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
void hideE2DetectorLegend()
hide Legend modul
void showE2DetectorLegend()
show Legend modul
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:150
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:117
virtual void show()
show Frame
Definition GNEFrame.cpp:115
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
const PositionVector & getLaneShape() const
get elements shape
Definition GNELane.cpp:136
double getLengthGeometryFactor() const
get length geometry factor
Definition GNELane.cpp:1824
GNEEdge * getParentEdge() const
get parent edge
Definition GNELane.cpp:118
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
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:1272
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:120
void showNeteditAttributesModule(GNEAttributeCarrier *templateAC)
show Netedit attributes modul
void hideNeteditAttributesModule()
hide Netedit attributes modul
bool getNeteditAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, const GNELane *lane) const
fill valuesMap with netedit attributes
void hideNetworkElementsSelector()
hide GNENetworkSelector Module
bool toggleSelectedElement(const GNENetworkElement *networkElement)
toggle selected networkElement
bool isShown() const
return true if module is shown
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
void showNetworkElementsSelector()
show GNENetworkSelector Module
std::vector< std::string > getSelectedIDs() const
get selected IDs
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::vector< SumoXMLTag > & getParentTags() const
get parent tags
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
return true if tag correspond to an element child of another element (Example: E3->Entry/Exit)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
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
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
GNEAdditional * getAdditionalFront() const
get front additional element or a pointer to nullptr
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNENet * getNet() const
get the net object
GNEViewParent * getViewParent() const
get the net object
void resetLastClickedPosition()
reset last clicked position
const GNEViewNetHelper::ObjectsUnderCursor & getObjectsUnderCursor() const
get objects under cursor
void setStatusBarText(const std::string &text)
set statusBar text
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.
virtual Position getPositionInformation() const
Returns the cursor's x/y position within the network.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
double x() const
Returns the x-position.
Definition Position.h:55
double z() const
Returns the z-position.
Definition Position.h:65
double y() const
Returns the y-position.
Definition Position.h:60
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D