// =========================================================================== // method definitions // =========================================================================== GUIJunctionWrapper::GUIJunctionWrapper(MSJunction& junction) : GUIGlObject(GLO_JUNCTION, junction.getID()), myJunction(junction) { if (myJunction.getShape().size() == 0) { Position pos = myJunction.getPosition(); myBoundary = Boundary(pos.x() - 1., pos.y() - 1., pos.x() + 1., pos.y() + 1.); } else { myBoundary = myJunction.getShape().getBoxBoundary(); } myMaxSize = MAX2(myBoundary.getWidth(), myBoundary.getHeight()); #ifdef HAVE_INTERNAL_LANES myIsInner = dynamic_cast<MSInternalJunction*>(&myJunction) != 0; #else myIsInner = false; #endif myAmWaterway = true; for (ConstMSEdgeVector::const_iterator it = myJunction.getIncoming().begin(); it != myJunction.getIncoming().end(); ++it) { if (!(*it)->isInternal() && !isWaterway((*it)->getPermissions())) { myAmWaterway = false; break; } } for (ConstMSEdgeVector::const_iterator it = myJunction.getOutgoing().begin(); it != myJunction.getOutgoing().end(); ++it) { if (!(*it)->isInternal() && !isWaterway((*it)->getPermissions())) { myAmWaterway = false; break; } } }
// =========================================================================== // method definitions // =========================================================================== GUIJunctionWrapper::GUIJunctionWrapper(GUIGlObjectStorage &idStorage, MSJunction &junction) throw() : GUIGlObject(idStorage, "junction:"+junction.getID()), myJunction(junction) { if (myJunction.getShape().size()==0) { Position2D pos = myJunction.getPosition(); myBoundary = Boundary(pos.x()-1., pos.y()-1., pos.x()+1., pos.y()+1.); } else { myBoundary = myJunction.getShape().getBoxBoundary(); } myMaxSize = MAX2(myBoundary.getWidth(), myBoundary.getHeight()); }
// =========================================================================== // method definitions // =========================================================================== GUIJunctionWrapper::GUIJunctionWrapper(MSJunction& junction) : GUIGlObject(GLO_JUNCTION, junction.getID()), myJunction(junction) { if (myJunction.getShape().size() == 0) { Position pos = myJunction.getPosition(); myBoundary = Boundary(pos.x() - 1., pos.y() - 1., pos.x() + 1., pos.y() + 1.); } else { myBoundary = myJunction.getShape().getBoxBoundary(); } myMaxSize = MAX2(myBoundary.getWidth(), myBoundary.getHeight()); #ifdef HAVE_INTERNAL_LANES myIsInner = dynamic_cast<MSInternalJunction*>(&myJunction) != 0; #else myIsInner = false; #endif }