]> git.tdb.fi Git - r2c2.git/blob - source/3d/catalogue.h
Use GL::Renderables and a Pipeline for rendering
[r2c2.git] / source / 3d / catalogue.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef MARKLIN3D_CATALOGUE_H_
9 #define MARKLIN3D_CATALOGUE_H_
10
11 #include <msp/gl/material.h>
12 #include <msp/gl/mesh.h>
13 #include "libmarklin/catalogue.h"
14
15 namespace Marklin {
16
17 class TrackType3D;
18
19 class Catalogue3D
20 {
21 private:
22         const Catalogue &catalogue;
23         std::map<const TrackType *, TrackType3D *> tracks;
24         Msp::GL::Material ballast_material;
25         Msp::GL::Material rail_material;
26         Msp::GL::Mesh endpoint_mesh;
27
28 public:
29         Catalogue3D(const Catalogue &);
30
31         const Catalogue &get_catalogue() const { return catalogue; }
32         const TrackType3D &get_track(const TrackType &) const;
33         const Msp::GL::Material &get_ballast_material() const { return ballast_material; }
34         const Msp::GL::Material &get_rail_material() const { return rail_material; }
35         const Msp::GL::Mesh &get_endpoint_mesh() const { return endpoint_mesh; }
36 private:
37         void build_endpoint_mesh();
38 };
39
40 }
41
42 #endif