X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fvehicletype.h;h=428a372f58ca313a729df93c21e01ba60f0ef95e;hb=54cb832334a83fc266b59e2c9b60ee936db7118f;hp=faa34aca4e8e5a936273b5207399ba2246ef47cd;hpb=97443d96ff3ce51388d2edd1e0dca8f2cd231346;p=r2c2.git diff --git a/source/3d/vehicletype.h b/source/3d/vehicletype.h index faa34ac..428a372 100644 --- a/source/3d/vehicletype.h +++ b/source/3d/vehicletype.h @@ -1,28 +1,22 @@ -/* $Id$ - -This file is part of the MSP Märklin suite -Copyright © 2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - -#ifndef LIBMARKLIN3D_VEHICLETYPE_H_ -#define LIBMARKLIN3D_VEHICLETYPE_H_ +#ifndef R2C2_3D_VEHICLETYPE_H_ +#define R2C2_3D_VEHICLETYPE_H_ #include #include -#include "libmarklin/vehicletype.h" - -namespace Marklin { +#include "libr2c2/vehicletype.h" +#include "objecttype.h" -class Catalogue3D; +namespace R2C2 { -class VehicleType3D +class VehicleType3D: public ObjectType3D { private: + const VehicleType &type; std::map objects; Msp::GL::Object *body_object; std::vector bogie_objects; - std::vector > axle_objects; + std::vector axle_objects; + std::vector rod_objects; public: VehicleType3D(Catalogue3D &, const VehicleType &); @@ -31,11 +25,15 @@ public: 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; + const Msp::GL::Object *get_rod_object(unsigned) const; private: Msp::GL::Object *get_object(const std::string &); + Msp::GL::Technique *create_technique(const std::map &); + Msp::GL::Mesh *create_open_wagon(const std::map &); + Msp::GL::Mesh *create_covered_wagon(const std::map &); + Msp::GL::Mesh *create_flat_wagon(const std::map &); }; -} // namespace Marklin +} // namespace R2C2 #endif