/* ------------------------------------------------------------------------- * GUIInductLoop::MyWrapper-methods * ----------------------------------------------------------------------- */ GUIInductLoop::MyWrapper::MyWrapper(GUIInductLoop& detector, SUMOReal pos) : GUIDetectorWrapper("induct loop", detector.getID()), myDetector(detector), myPosition(pos) { myFGPosition = detector.getLane()->geometryPositionAtOffset(pos); myBoundary.add(myFGPosition.x() + (SUMOReal) 5.5, myFGPosition.y() + (SUMOReal) 5.5); myBoundary.add(myFGPosition.x() - (SUMOReal) 5.5, myFGPosition.y() - (SUMOReal) 5.5); myFGRotation = -detector.getLane()->getShape().rotationDegreeAtOffset(pos); }
GUIInductLoop::MyWrapper::MyWrapper(GUIInductLoop& detector, double pos) : GUIDetectorWrapper(GLO_E1DETECTOR, detector.getID()), myDetector(detector), myPosition(pos), mySpecialColor(nullptr) { myFGPosition = detector.getLane()->geometryPositionAtOffset(pos); myBoundary.add(myFGPosition.x() + (double) 5.5, myFGPosition.y() + (double) 5.5); myBoundary.add(myFGPosition.x() - (double) 5.5, myFGPosition.y() - (double) 5.5); myFGRotation = -detector.getLane()->getShape().rotationDegreeAtOffset(pos); }
/* ------------------------------------------------------------------------- * GUIInductLoop::MyWrapper-methods * ----------------------------------------------------------------------- */ GUIInductLoop::MyWrapper::MyWrapper(GUIInductLoop &detector, GUIGlObjectStorage &idStorage, GUILaneWrapper &wrapper, SUMOReal pos) throw() : GUIDetectorWrapper(idStorage, "induct loop:"+detector.getID()), myDetector(detector), myPosition(pos) { const Position2DVector &v = wrapper.getShape(); myFGPosition = v.positionAtLengthPosition(pos); Line2D l(v.getBegin(), v.getEnd()); SUMOReal sgPos = pos / v.length() * l.length(); myBoundary.add(myFGPosition.x()+(SUMOReal) 5.5, myFGPosition.y()+(SUMOReal) 5.5); myBoundary.add(myFGPosition.x()-(SUMOReal) 5.5, myFGPosition.y()-(SUMOReal) 5.5); myFGRotation = -v.rotationDegreeAtLengthPosition(pos); }