X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fpath.cpp;h=b3b2fa1645ad367084d32535afc73bc5614a0a31;hb=f4ffb776aa0d4f51c058d27fb0f51449c05302c3;hp=1128b67bb9d61e9b4d0995da236650257e7b90f2;hpb=90790c9a28793d31b9ea38eea2f55652a0e9297b;p=r2c2.git diff --git a/source/3d/path.cpp b/source/3d/path.cpp index 1128b67..b3b2fa1 100644 --- a/source/3d/path.cpp +++ b/source/3d/path.cpp @@ -19,7 +19,8 @@ namespace Marklin { Path3D::Path3D(const Track3D &t): track(t), paths(0), - automatic(true) + automatic(true), + z_offs(0) { track.get_layout().get_path_scene().add(*this); } @@ -55,9 +56,14 @@ void Path3D::set_color(const GL::Color &c) color = c; } +void Path3D::set_layer(float l) +{ + z_offs = l*track.get_track().get_layout().get_catalogue().get_gauge()*0.01; +} + void Path3D::render(const GL::Tag &tag) const { - if(tag==0) + if(tag=="unlit") { unsigned mask = (automatic ? 1<>=1)