]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/vehicle.h
Store all axles in a single array
[r2c2.git] / source / libr2c2 / vehicle.h
index df251c11ac3df1a90d6ec6300bf3534c74acb183..1e9454fa5afb0fd2607099a72cbfc5c1e06de205 100644 (file)
@@ -43,7 +43,7 @@ public:
        {
                const VehicleType::Bogie *type;
                Angle direction;
-               std::vector<Axle> axles;
+               std::vector<Axle *> axles;
 
                Bogie(const VehicleType::Bogie &);
        };
@@ -64,6 +64,7 @@ private:
        Vehicle *prev;
        TrackOffsetIter track;
        std::vector<Axle> axles;
+       std::vector<Axle *> fixed_axles;
        std::vector<Bogie> bogies;
        std::vector<Rod> rods;
        unsigned front_sensor;
@@ -96,6 +97,7 @@ public:
        Track *get_track() const { return track.track(); }
        unsigned get_entry() const { return track.entry(); }
        float get_offset() const { return track.offset(); }
+       const Axle &get_axle(unsigned) const;
        const Axle &get_fixed_axle(unsigned) const;
        const Bogie &get_bogie(unsigned) const;
        const Axle &get_bogie_axle(unsigned, unsigned) const;