]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/vehicletype.h
Move the fitting part of Manipulator::connect to a separate function
[r2c2.git] / source / 3d / vehicletype.h
index f734e50d9468d49de118b7505ba404028a63f679..faa34aca4e8e5a936273b5207399ba2246ef47cd 100644 (file)
@@ -9,6 +9,7 @@ Distributed under the GPL
 #define LIBMARKLIN3D_VEHICLETYPE_H_
 
 #include <msp/gl/mesh.h>
+#include <msp/gl/object.h>
 #include "libmarklin/vehicletype.h"
 
 namespace Marklin {
@@ -18,12 +19,21 @@ class Catalogue3D;
 class VehicleType3D
 {
 private:
-       Msp::GL::Mesh body_mesh;
+       std::map<std::string, Msp::GL::Object *> objects;
+       Msp::GL::Object *body_object;
+       std::vector<Msp::GL::Object *> bogie_objects;
+       std::vector<std::vector<Msp::GL::Object *> > axle_objects;
 
 public:
        VehicleType3D(Catalogue3D &, const VehicleType &);
+       ~VehicleType3D();
 
-       const Msp::GL::Mesh &get_body_mesh() const { return body_mesh; }
+       const Msp::GL::Object *get_body_object() const { return body_object; }
+       const Msp::GL::Object *get_axle_object(unsigned) const;
+       const Msp::GL::Object *get_bogie_object(unsigned) const;
+       const Msp::GL::Object *get_bogie_axle_object(unsigned, unsigned) const;
+private:
+       Msp::GL::Object *get_object(const std::string &);
 };
 
 } // namespace Marklin