57 #include <osg/Geometry>
60 #ifdef CHECK_MEMORY_LEAKS
62 #endif // CHECK_MEMORY_LEAKS
69 MSEdge*
const edge,
unsigned int numericalID,
72 :
MSLane(id, maxSpeed, length, edge, numericalID, shape, width, permissions),
77 for (
int i = 0; i < e; ++i) {
101 const MSLane::VehCont::iterator& at,
167 unsigned int noLinks = (
unsigned int)
myLinks.size();
180 glTranslated(end.
x(), end.
y(), 0);
181 glRotated(rot, 0, 0, 1);
182 for (
int i = noLinks; --i >= 0;) {
194 unsigned int noLinks = (
unsigned int)
myLinks.size();
207 glTranslated(end.
x(), end.
y(), 0);
208 glRotated(rot, 0, 0, 1);
209 for (
int i = noLinks; --i >= 0;) {
225 unsigned int noLinks = (
unsigned int)
myLinks.size();
234 glColor3d(0.5, 0.5, 0.5);
236 glTranslated(end.
x(), end.
y(), 0);
237 glRotated(rot, 0, 0, 1);
253 glTranslated(end.
x(), end.
y(), 0);
254 glRotated(rot, 0, 0, 1);
255 for (
unsigned int i = 0; i < noLinks; ++i) {
290 glColor3d(.7, .7, 0);
304 glColor3d(.2, .2, .2);
307 glColor3d(.4, .2, .2);
310 glColor3d(.5, .5, .5);
313 glColor3d(.2, .2, .4);
345 glTranslated(end.
x(), end.
y(), 0);
346 glRotated(rot, 0, 0, 1);
347 for (std::vector<MSLink*>::const_iterator i =
myLinks.begin(); i !=
myLinks.end(); ++i) {
395 for (std::vector<MSLink*>::const_iterator i =
myLinks.begin(); i !=
myLinks.end(); ++i) {
397 const MSLane* connected = (*i)->getLane();
398 if (connected == 0) {
423 glColor3d(.2, .2, .2);
426 glColor3d(.4, .2, .2);
429 glColor3d(.5, .5, .5);
432 glColor3d(.2, .2, .4);
442 glVertex2f(p1.
x(), p1.
y());
443 glVertex2f(p2.
x(), p2.
y());
454 bool mustDrawMarkings =
false;
478 const SUMOReal halfRailWidth = 0.725;
481 glTranslated(0, 0, .1);
486 mustDrawMarkings = !isInternal;
494 if (!isInternal && drawDetails) {
498 glTranslated(0, 0, .2);
508 glTranslated(0, 0, .1);
518 if (mustDrawMarkings && drawDetails) {
525 for (MSLane::VehCont::const_iterator v = vehicles.begin(); v != vehicles.end(); ++v) {
526 if ((*v)->getLane() ==
this) {
532 for (std::set<const MSVehicle*>::const_iterator v = parking.begin(); v != parking.end(); ++v) {
554 for (
int i = 0; i < e; ++i) {
561 glVertex2d(-mw, -t - 3.);
589 glTranslated(0, 0, 0.1);
591 for (
int i = 0; i < e; ++i) {
598 glVertex2d(-1, -t - 0.3);
599 glVertex2d(1.0, -t - 0.3);
623 new FXMenuSeparator(ret);
667 const std::vector<SUMOReal>&
673 const std::vector<SUMOReal>&
748 switch (activeScheme) {
805 osg::Vec4ubArray* colors =
dynamic_cast<osg::Vec4ubArray*
>(myGeom->getColorArray());
807 myGeom->setColorArray(colors);