X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Ftrack.cpp;h=72973f3a9b4bc03501af1777d004a275f14cc5b6;hb=e621dd4120cb253417167b4295e436cee095ccb0;hp=8b36b194220c0c3175da4c322e9b846e5112b656;hpb=f8a7788cee0261babfc4c804a58515aad6dfbc3d;p=r2c2.git diff --git a/source/3d/track.cpp b/source/3d/track.cpp index 8b36b19..72973f3 100644 --- a/source/3d/track.cpp +++ b/source/3d/track.cpp @@ -1,13 +1,5 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2006-2011 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #include #include -#include #include #include "libr2c2/tracktype.h" #include "endpoint.h" @@ -91,7 +83,7 @@ Vector Track3D::get_node() const return Vector(pos.x+c*center.x-s*center.y, pos.y+s*center.x+c*center.y, pos.z+0.02); } -GL::Matrix Track3D::get_matrix() const +GL::Matrix Track3D::create_matrix() const { const Vector &pos = track.get_position(); float rot = track.get_rotation(); @@ -106,13 +98,7 @@ GL::Matrix Track3D::get_matrix() const void Track3D::setup_render(Msp::GL::Renderer &renderer, const GL::Tag &) const { - renderer.matrix_stack() *= get_matrix(); - glPushName(reinterpret_cast(this)); -} - -void Track3D::finish_render(Msp::GL::Renderer &, const GL::Tag &) const -{ - glPopName(); + renderer.matrix_stack() *= create_matrix(); } void Track3D::link_changed(unsigned i, Track *trk)