]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/vehicletype.h
Set correct Z coordinate to vehicle position
[r2c2.git] / source / libmarklin / vehicletype.h
index 01e678b05ee17c077dabb0895a6f3bd03bbf13aa..9ef1c5ec9d22798620674d486588789cecb24e07 100644 (file)
@@ -22,6 +22,7 @@ public:
        private:
                void axle();
                void bogie();
+               void function(unsigned, const std::string &);
                void height(float);
                void length(float);
                void width(float);
@@ -41,6 +42,9 @@ public:
                float position;
                float wheel_dia;
                bool powered;
+               std::string object;
+
+               Axle();
        };
 
        struct Bogie
@@ -56,28 +60,40 @@ public:
 
                float position;
                std::vector<Axle> axles;
+               std::string object;
+               bool rotate_object;
+
+               Bogie();
        };
 
 private:
        unsigned art_nr;
        std::string name;
+       bool locomotive;
+       std::map<unsigned, std::string> functions;
        float length;
        float width;
        float height;
        std::vector<Axle> axles;
        std::vector<Bogie> bogies;
+       std::string object;
 
 public:
        VehicleType(unsigned);
-       virtual ~VehicleType() { } // XXX temporary
 
        unsigned get_article_number() const { return art_nr; }
        const std::string &get_name() const { return name; }
+       bool is_locomotive() const { return locomotive; }
+       unsigned get_max_function() const;
+       const std::map<unsigned, std::string> &get_functions() const { return functions; }
        float get_length() const { return length; }
        float get_width() const { return width; }
        float get_height() const { return height; }
        const std::vector<Axle> &get_axles() const { return axles; }
        const std::vector<Bogie> &get_bogies() const { return bogies; }
+       float get_front_axle_offset() const;
+       float get_back_axle_offset() const;
+       const std::string &get_object() const { return object; }
 };
 
 } // namespace Marklin