]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/track.h
Ignore dubious speed measurements when finding speed step
[r2c2.git] / source / 3d / track.h
index 7b8c23565f3024ecb1c954f6839a7f3c48fd8925..9555bff7a67083edb30f991cdbcdd7e8d46eb549 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of R²C²
-Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa
+Copyright © 2006-2011 Mikkosoft Productions, Mikko Rasa
 Distributed under the GPL
 */
 
@@ -9,9 +9,9 @@ Distributed under the GPL
 #define R2C2_3D_TRACK_H_
 
 #include <list>
-#include <msp/gl/renderable.h>
-#include <msp/gl/vertexarray.h>
-#include <msp/gl/vertexarraybuilder.h>
+#include <sigc++/trackable.h>
+#include <msp/gl/matrix.h>
+#include <msp/gl/objectinstance.h>
 #include "libr2c2/track.h"
 #include "libr2c2/trackpart.h"
 #include "object.h"
@@ -23,7 +23,7 @@ class Layout3D;
 class Path3D;
 class TrackType3D;
 
-class Track3D: public Object3D, public Msp::GL::Renderable
+class Track3D: public Object3D, public Msp::GL::ObjectInstance, public sigc::trackable
 {
 private:
        Layout3D &layout;
@@ -45,8 +45,11 @@ public:
        virtual Point get_node() const;
        virtual bool is_visible() const { return true; }
 
-       void apply_matrix() const;
-       virtual void render(const Msp::GL::Tag &) const;
+       Msp::GL::Matrix get_matrix() const;
+       virtual void setup_render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
+       virtual void finish_render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
+private:
+       void link_changed(unsigned, Track *);
 };
 
 } // namespace R2C2