3 This file is part of R²C²
4 Copyright © 2010-2011 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef R2C2_3D_CATALOGUE_H_
9 #define R2C2_3D_CATALOGUE_H_
11 #include <msp/datafile/collection.h>
12 #include <msp/fs/path.h>
13 #include <msp/gl/material.h>
14 #include <msp/gl/mesh.h>
15 #include "libr2c2/catalogue.h"
22 class Catalogue3D: public Msp::DataFile::Collection
26 std::map<const TrackType *, TrackType3D *> tracks;
27 std::map<const VehicleType *, VehicleType3D *> vehicles;
28 Msp::GL::Mesh endpoint_mesh;
31 Catalogue3D(Catalogue &);
34 const Catalogue &get_catalogue() const { return catalogue; }
35 const TrackType3D &get_track(const TrackType &) const;
36 const VehicleType3D &get_vehicle(const VehicleType &) const;
37 const Msp::GL::Mesh &get_endpoint_mesh() const { return endpoint_mesh; }
39 void track_added(const TrackType &);
40 void vehicle_added(const VehicleType &);
41 void build_endpoint_mesh();
43 Msp::FS::Path locate_file(const std::string &);
46 T *create(const std::string &);
49 T *create2(const std::string &);