]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/path.h
New approach for displaying track state
[r2c2.git] / source / 3d / path.h
index 58dae2435d8fe4cb87036d2857035273e31bbf2a..ceeb178ce04c6b11fa67e63792ce4f054fb70ba3 100644 (file)
@@ -4,17 +4,20 @@
 #include <msp/gl/color.h>
 #include <msp/gl/mesh.h>
 #include <msp/gl/renderable.h>
+#include "utility.h"
 
 namespace R2C2 {
 
 class Track3D;
 
-class Path3D: public Msp::GL::Renderable
+class Path3D: public Utility3D, public Msp::GL::Renderable, public sigc::trackable
 {
 private:
        const Track3D &track;
-       unsigned paths;
+       int path;
+       int side;
        bool automatic;
+       const Msp::GL::Mesh *mesh;
        Msp::GL::Color color;
        float z_offs;
 
@@ -23,11 +26,15 @@ public:
        ~Path3D();
 
        void set_automatic();
-       void set_path(unsigned);
-       void set_mask(unsigned);
+       void set_path(int);
+       void set_side(int);
        void set_color(const Msp::GL::Color &);
        void set_layer(float);
+private:
+       void path_changed(unsigned);
+       void update_mesh();
 
+public:
        virtual long get_instance_key() const;
 
        virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;