]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/track.h
Correctly handle slope when snapping tracks
[r2c2.git] / source / 3d / track.h
index cf3c051ee22e381b17daf1f6c4b85cd65d91aee3..3630ac6ae4b8f4a6e4bee1a75e162da67f67e53e 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
 #ifndef MARKLIN3D_TRACK_H_
 #define MARKLIN3D_TRACK_H_
 
@@ -13,7 +20,7 @@ namespace Marklin {
 class Track3D
 {
 private:
-       Track        &track;
+       Track &track;
        Msp::GL::Color color;
        std::vector<Point> border;
        Msp::GL::VertexArray varray;
@@ -25,15 +32,15 @@ private:
 public:
        Track3D(Track &, unsigned);
 
-       void set_color(const Msp::GL::Color &c)  { color=c; }
+       Track &get_track() const { return track; }
+       void set_color(const Msp::GL::Color &);
        void set_quality(unsigned);
        void get_bounds(float, Point &, Point &) const;
-       Track &get_track() const { return track; }
        void render() const;
        void render_endpoints() const;
        void render_route(int) const;
 private:
-       void prepare_render() const;
+       void prepare_render(bool) const;
        void build_object();
        void build_part(const TrackPart &, Msp::GL::VertexArrayBuilder &, unsigned &);
 };