+ profile.append_vertex(Vector(i*(gauge*0.5+rail_min.x*2), 0, 0), false);
+ profile.append_vertex(Vector(i*(gauge*0.5+rail_max.x*2), 0, 0), false);
+ }
+
+ // TODO Avoid generating redundant meshes for single-path tracks
+ for(int j=-1; j<=4; ++j)
+ {
+ if(j>=0 && !((paths>>j)&1))
+ continue;
+
+ GL::Mesh *m = new GL::Mesh(GL::VERTEX3);