]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/track.h
Rename Point to Vector
[r2c2.git] / source / libr2c2 / track.h
index 95f902303a58f8a08d1118f0afd9c95782516702..8f75f78fc1c093f94e83f74e70a5518b1f378aa3 100644 (file)
@@ -33,13 +33,14 @@ public:
                void turnout_id(unsigned);
        };
 
+       sigc::signal<void, unsigned, Track *> signal_link_changed;
        sigc::signal<void, unsigned> signal_path_changed;
 
 private:
        Layout &layout;
        const TrackType &type;
        Block *block;
-       Point pos;
+       Vector pos;
        float rot;
        float slope;
        bool flex;
@@ -59,11 +60,11 @@ public:
 
        void set_block(Block *);
        Block &get_block() const;
-       void set_position(const Point &);
+       void set_position(const Vector &);
        void set_rotation(float);
        void set_slope(float);
        void set_flex(bool);
-       const Point &get_position() const { return pos; }
+       const Vector &get_position() const { return pos; }
        float get_rotation() const { return rot; }
        float get_slope() const { return slope; }
        bool get_flex() const { return flex; }
@@ -77,10 +78,10 @@ public:
        unsigned get_active_path() const { return active_path; }
 
        int get_endpoint_by_link(Track &) const;
-       Point get_endpoint_position(unsigned) const;
+       Vector get_endpoint_position(unsigned) const;
        float get_endpoint_direction(unsigned) const;
        bool snap_to(Track &, bool, float = 0);
-       bool snap(Point &, float &) const;
+       bool snap(Vector &, float &) const;
        void break_link(Track &);
        void break_links();
        const std::vector<Track *> &get_links() const { return links; }
@@ -90,7 +91,7 @@ public:
 
        void save(std::list<Msp::DataFile::Statement> &) const;
 private:
-       void turnout_event(unsigned, bool);
+       void turnout_event(unsigned, unsigned);
 };
 
 } // namespace R2C2