]> git.tdb.fi Git - r2c2.git/blob - source/3d/tracktype.h
6cde93eb13b41f6501a0eeb3b1c0edf1a66a9d67
[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 #include "objecttype.h"
11
12 namespace R2C2 {
13
14 class TrackType3D: public ObjectType3D
15 {
16 private:
17         Msp::GL::Mesh *mesh;
18         Msp::GL::Object *object;
19         bool own_data;
20         std::map<unsigned, Msp::GL::Mesh *> path_meshes;
21
22 public:
23         TrackType3D(Catalogue3D &, const TrackType &);
24         ~TrackType3D();
25
26         const Msp::GL::Object &get_object() const { return *object; }
27         const Msp::GL::Mesh &get_path_mesh(int, int) const;
28
29 private:
30         void build_part(const TrackPart &, const Profile &, const Vector &, bool, Msp::GL::MeshBuilder &, unsigned &);
31 };
32
33 } // namespace R2C2
34
35 #endif