X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Ftrack.cpp;h=401dd2d9634956a15d645047881663e1d355c44c;hb=1ff06c5bc46a677fa389ef86c6b26664368f1653;hp=49ef02e4ff06ae079968d5698c565b71e19f6f86;hpb=45ec6f645ff2c303700711e96421c75acf33db1a;p=r2c2.git diff --git a/source/3d/track.cpp b/source/3d/track.cpp index 49ef02e..401dd2d 100644 --- a/source/3d/track.cpp +++ b/source/3d/track.cpp @@ -1,6 +1,6 @@ /* $Id$ -This file is part of the MSP Märklin suite +This file is part of R²C² Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -8,7 +8,7 @@ Distributed under the GPL #include #include #include -#include "libmarklin/tracktype.h" +#include "libr2c2/tracktype.h" #include "endpoint.h" #include "layout.h" #include "path.h" @@ -18,7 +18,7 @@ Distributed under the GPL using namespace std; using namespace Msp; -namespace Marklin { +namespace R2C2 { Track3D::Track3D(Layout3D &l, Track &t): layout(l), @@ -86,9 +86,9 @@ void Track3D::apply_matrix() const const Point &pos = track.get_position(); float rot = track.get_rotation(); - glTranslatef(pos.x, pos.y, pos.z); - glRotatef(rot*180/M_PI, 0, 0, 1); - glRotatef(track.get_slope()/track.get_type().get_total_length()*180/M_PI, 0, -1, 0); + GL::translate(pos.x, pos.y, pos.z); + GL::rotate(rot*180/M_PI, 0, 0, 1); + GL::rotate(track.get_slope()/track.get_type().get_total_length()*180/M_PI, 0, -1, 0); } void Track3D::render(const GL::Tag &tag) const @@ -104,4 +104,4 @@ void Track3D::render(const GL::Tag &tag) const glPopName(); } -} // namespace Marklin +} // namespace R2C2