X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fpath.cpp;h=fe4a2467b57df59c64e9d3aea9f4396af922eccb;hb=e621dd4120cb253417167b4295e436cee095ccb0;hp=1128b67bb9d61e9b4d0995da236650257e7b90f2;hpb=90790c9a28793d31b9ea38eea2f55652a0e9297b;p=r2c2.git diff --git a/source/3d/path.cpp b/source/3d/path.cpp index 1128b67..fe4a246 100644 --- a/source/3d/path.cpp +++ b/source/3d/path.cpp @@ -1,25 +1,21 @@ -/* $Id$ - -This file is part of the MSP Märklin suite -Copyright © 2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #include -#include "libmarklin/tracktype.h" +#include +#include "libr2c2/tracktype.h" #include "layout.h" #include "path.h" #include "track.h" #include "tracktype.h" +using namespace std; using namespace Msp; -namespace Marklin { +namespace R2C2 { Path3D::Path3D(const Track3D &t): track(t), paths(0), - automatic(true) + automatic(true), + z_offs(0) { track.get_layout().get_path_scene().add(*this); } @@ -37,7 +33,7 @@ void Path3D::set_automatic() void Path3D::set_path(unsigned p) { if(!(track.get_track().get_type().get_paths()&(1<(&track.get_type()); +} + +void Path3D::render(GL::Renderer &renderer, const GL::Tag &tag) const { - if(tag==0) + if(tag=="unlit") { unsigned mask = (automatic ? 1<>=1) if(mask&1) - track.get_type().get_path_mesh(i).draw(); + track.get_type().get_path_mesh(i).draw(renderer); } } -} // namespace Marklin +} // namespace R2C2