]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/track.cpp
Change terminology to better distinguish routes on the layout from paths across track...
[r2c2.git] / source / 3d / track.cpp
index 47e6e61161bb0845befa987756251e53c7e47527..b2ee4fad8fd34e942f25ceec0549169bad6cdb70 100644 (file)
@@ -132,17 +132,17 @@ void Track3D::render_endpoints() const
        glPopMatrix();
 }
 
-void Track3D::render_route(int route) const
+void Track3D::render_path(int path) const
 {
        prepare_render(true);
 
        varray.apply();
-       if(route>=0 && static_cast<unsigned>(route)<route_seq.size())
-               glDrawElements(GL_QUADS, route_seq[route].size(), GL_UNSIGNED_INT, &route_seq[route][0]);
+       if(path>=0 && static_cast<unsigned>(path)<path_seq.size())
+               glDrawElements(GL_QUADS, path_seq[path].size(), GL_UNSIGNED_INT, &path_seq[path][0]);
        else
        {
-               for(unsigned i=0; i<route_seq.size(); ++i)
-                       glDrawElements(GL_QUADS, route_seq[i].size(), GL_UNSIGNED_INT, &route_seq[i][0]);
+               for(unsigned i=0; i<path_seq.size(); ++i)
+                       glDrawElements(GL_QUADS, path_seq[i].size(), GL_UNSIGNED_INT, &path_seq[i][0]);
        }
 
        glPopMatrix();
@@ -167,8 +167,8 @@ void Track3D::build_object()
 
        base_seq.clear();
        rail_seq.clear();
-       route_seq.clear();
-       route_seq.resize(track.get_type().get_n_routes());
+       path_seq.clear();
+       path_seq.resize(track.get_type().get_n_paths());
 
        const vector<TrackPart> &parts = track.get_type().get_parts();
        unsigned index = 0;
@@ -244,10 +244,10 @@ void Track3D::build_part(const TrackPart &part, GL::VertexArrayBuilder &va_build
                        rail_seq.push_back(base_index+(i+1)*psize+1+j*2);
                        rail_seq.push_back(base_index+i*psize+1+j*2);
                }
-               route_seq[part.route].push_back(base_index+i*psize+18);
-               route_seq[part.route].push_back(base_index+(i+1)*psize+18);
-               route_seq[part.route].push_back(base_index+(i+1)*psize+19);
-               route_seq[part.route].push_back(base_index+i*psize+19);
+               path_seq[part.path].push_back(base_index+i*psize+18);
+               path_seq[part.path].push_back(base_index+(i+1)*psize+18);
+               path_seq[part.path].push_back(base_index+(i+1)*psize+19);
+               path_seq[part.path].push_back(base_index+i*psize+19);
        }
 
        base_index += (nsegs+1)*psize;