]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/vehicletype.h
Rename the project to R²C²
[r2c2.git] / source / 3d / vehicletype.h
index f734e50d9468d49de118b7505ba404028a63f679..72c2c231a1f84e24c57b45646f309b28125cdb5c 100644 (file)
@@ -1,31 +1,47 @@
 /* $Id$
 
-This file is part of the MSP Märklin suite
+This file is part of R²C²
 Copyright © 2010  Mikkosoft Productions, Mikko Rasa
 Distributed under the GPL
 */
 
-#ifndef LIBMARKLIN3D_VEHICLETYPE_H_
-#define LIBMARKLIN3D_VEHICLETYPE_H_
+#ifndef LIBR2C23D_VEHICLETYPE_H_
+#define LIBR2C23D_VEHICLETYPE_H_
 
 #include <msp/gl/mesh.h>
-#include "libmarklin/vehicletype.h"
+#include <msp/gl/object.h>
+#include "libr2c2/vehicletype.h"
 
-namespace Marklin {
+namespace R2C2 {
 
 class Catalogue3D;
 
 class VehicleType3D
 {
 private:
-       Msp::GL::Mesh body_mesh;
+       const Catalogue3D &catalogue;
+       const VehicleType &type;
+       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 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 &);
+       Msp::GL::Technique *create_technique(const std::map<std::string, std::string> &);
+       Msp::GL::Mesh *create_open_wagon(const std::map<std::string, std::string> &);
+       Msp::GL::Mesh *create_covered_wagon(const std::map<std::string, std::string> &);
+       Msp::GL::Mesh *create_flat_wagon(const std::map<std::string, std::string> &);
 };
 
-} // namespace Marklin
+} // namespace R2C2
 
 #endif