X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Ftracktype.cpp;h=d664c3948ef7a1c9bf54998a4abe661c45b2568e;hb=d405b9943c888e3945c7ea4e496f9d300b114fe0;hp=d73387c998dbbece809ef234767e77ff8a4b5802;hpb=d6816c177ee8d5f5191e833dce8e3c4e7e0222bf;p=r2c2.git diff --git a/source/3d/tracktype.cpp b/source/3d/tracktype.cpp index d73387c..d664c39 100644 --- a/source/3d/tracktype.cpp +++ b/source/3d/tracktype.cpp @@ -15,15 +15,16 @@ TrackType3D::TrackType3D(Catalogue3D &c, const TrackType &tt): object(0), own_data(false) { + const TrackAppearance &appearance = tt.get_appearance(); const Catalogue &cat = catalogue.get_catalogue(); const vector &parts = tt.get_parts(); - const Profile &ballast_profile = cat.get_ballast_profile(); + const Profile &ballast_profile = appearance.get_ballast_profile(); const Vector &ballast_min = ballast_profile.get_min_coords(); const Vector &ballast_max = ballast_profile.get_max_coords(); float ballast_h = ballast_max.y-ballast_min.y; - const Profile &rail_profile = cat.get_rail_profile(); + const Profile &rail_profile = appearance.get_rail_profile(); const Vector &rail_min = rail_profile.get_min_coords(); const Vector &rail_max = rail_profile.get_max_coords(); float rail_h = rail_max.y-rail_min.y; @@ -53,7 +54,7 @@ TrackType3D::TrackType3D(Catalogue3D &c, const TrackType &tt): object = new GL::Object; object->set_mesh(mesh); - object->set_technique(&catalogue.get(cat.get_track_technique())); + object->set_technique(&catalogue.get(appearance.get_technique())); own_data = true; }