58 #include <osg/Geometry>
61 #ifdef CHECK_MEMORY_LEAKS
63 #endif // CHECK_MEMORY_LEAKS
71 MSEdge*
const edge,
unsigned int numericalID,
74 :
MSLane(id, maxSpeed, length, edge, numericalID, shape, width, permissions),
79 for (
int i = 0; i < e; ++i) {
103 const MSLane::VehCont::iterator& at,
169 unsigned int noLinks = (
unsigned int)
myLinks.size();
186 for (
int i = noLinks; --i >= 0;) {
196 unsigned int noLinks = (
unsigned int)
myLinks.size();
215 for (
int i = noLinks; --i >= 0;) {
233 glTranslated(end.
x(), end.
y(), 0);
234 glRotated(rot, 0, 0, 1);
242 unsigned int noLinks = (
unsigned int)
myLinks.size();
259 for (
unsigned int i = 0; i < noLinks; ++i) {
276 glTranslated(end.
x(), end.
y(), 0);
277 glRotated(rot, 0, 0, 1);
288 glTranslated(end.
x(), end.
y(), 0);
289 glRotated(rot, 0, 0, 1);
336 glTranslated(end.
x(), end.
y(), 0);
337 glRotated(rot, 0, 0, 1);
341 for (std::vector<MSLink*>::const_iterator i =
myLinks.begin(); i !=
myLinks.end(); ++i) {
389 for (std::vector<MSLink*>::const_iterator i =
myLinks.begin(); i !=
myLinks.end(); ++i) {
391 const MSLane* connected = (*i)->getLane();
392 if (connected == 0) {
417 glColor3d(.2, .2, .2);
420 glColor3d(.4, .2, .2);
423 glColor3d(.5, .5, .5);
426 glColor3d(.2, .2, .4);
436 glVertex2f(p1.
x(), p1.
y());
437 glVertex2f(p2.
x(), p2.
y());
450 bool mustDrawMarkings =
false;
452 if (isCrossing || isWalkingArea) {
478 glTranslated(0, 0, .1);
484 }
else if (isCrossing) {
488 glColor3d(0.9, 0.9, 0.9);
490 glColor3d(0.1, 0.1, 0.1);
492 glTranslated(0, 0, .2);
494 glTranslated(0, 0, -.2);
495 }
else if (isWalkingArea) {
496 glTranslated(0, 0, .2);
502 glTranslated(0, 0, -.2);
503 #ifdef GUILane_DEBUG_DRAW_WALKING_AREA_VERTICES
505 glTranslated(0, 0, .4);
506 for (
int i = 0; i < (
int)
myShape.size(); ++i) {
508 80 / s.
scale, color, 0);
510 glTranslated(0, 0, -.4);
517 glGetFloatv(GL_CURRENT_COLOR, color);
528 if ((!isInternal || isCrossing) && drawDetails) {
531 glTranslated(0, 0, .5);
541 glTranslated(0, 0, .1);
551 if (mustDrawMarkings && drawDetails) {
558 for (MSLane::VehCont::const_iterator v = vehicles.begin(); v != vehicles.end(); ++v) {
559 if ((*v)->getLane() ==
this) {
565 for (std::set<const MSVehicle*>::const_iterator v = parking.begin(); v != parking.end(); ++v) {
587 for (
int i = 0; i < e; ++i) {
594 glVertex2d(-mw, -t - 3.);
619 glTranslated(0, 0, 0.1);
621 for (
int i = 0; i < e; ++i) {
627 glVertex2d(-halfWidth, -t);
628 glVertex2d(-halfWidth, -t - length);
629 glVertex2d(halfWidth, -t - length);
630 glVertex2d(halfWidth, -t);
653 new FXMenuSeparator(ret);
700 const std::vector<SUMOReal>&
706 const std::vector<SUMOReal>&
748 switch (activeScheme) {
762 switch (activeScheme) {
827 osg::Vec4ubArray* colors =
dynamic_cast<osg::Vec4ubArray*
>(myGeom->getColorArray());
829 myGeom->setColorArray(colors);