]> git.tdb.fi Git - r2c2.git/blob - source/3d/tracktype.h
27bf7fe97723ec8e9e0c39d2f4b63ade8bcd0c89
[r2c2.git] / source / 3d / tracktype.h
1 #ifndef R2C2_3D_TRACKTYPE_H_
2 #define R2C2_3D_TRACKTYPE_H_
3
4 #include <map>
5 #include <msp/gl/mesh.h>
6 #include <msp/gl/meshbuilder.h>
7 #include <msp/gl/object.h>
8 #include "libr2c2/profile.h"
9 #include "libr2c2/tracktype.h"
10
11 namespace R2C2 {
12
13 class Catalogue3D;
14
15 class TrackType3D
16 {
17 private:
18         Catalogue3D &catalogue;
19         Msp::GL::Mesh *mesh;
20         Msp::GL::Object *object;
21         bool own_data;
22         std::map<unsigned, Msp::GL::Mesh *> path_meshes;
23
24 public:
25         TrackType3D(Catalogue3D &, const TrackType &);
26         ~TrackType3D();
27
28         const Msp::GL::Object &get_object() const { return *object; }
29         const Msp::GL::Mesh &get_path_mesh(int, int) const;
30
31 private:
32         void build_part(const TrackPart &, const Profile &, const Vector &, bool, Msp::GL::MeshBuilder &, unsigned &);
33 };
34
35 } // namespace R2C2
36
37 #endif