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