]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/track.h
Introduce a tilt (vertical angle) property to Object
[r2c2.git] / source / libr2c2 / track.h
index e1349a1ff8be919f7fced788ce823227dfa7f4c0..916ea1966183c8ce5a87ec97a0c2297570a29c4a 100644 (file)
@@ -25,6 +25,8 @@ public:
                void position(float, float, float);
                void rotation(float);
                void sensor_id(unsigned);
+               void slope(float);
+               void tilt(float);
                void turnout_id(unsigned);
        };
 
@@ -56,11 +58,11 @@ public:
        Block &get_block() const;
        virtual void set_position(const Vector &);
        virtual void set_rotation(const Angle &);
-       void set_slope(float);
+       virtual void set_tilt(const Angle &);
        void set_flex(bool);
-       float get_slope() const { return slope; }
        bool get_flex() const { return flex; }
 private:
+       void propagate_slope();
        void check_slope();
 
 public: