]> git.tdb.fi Git - r2c2.git/blob - source/3d/vehicle.h
aa5042e4b73c3d2643c2850106ac8ab4a7c10eae
[r2c2.git] / source / 3d / vehicle.h
1 #ifndef LIBR2C23D_VEHICLE_H_
2 #define LIBR2C23D_VEHICLE_H_
3
4 #include <msp/gl/renderable.h>
5 #include "libr2c2/vehicle.h"
6 #include "object.h"
7
8 namespace R2C2 {
9
10 class Axle3D;
11 class Bogie3D;
12 class Layout3D;
13 class Rod3D;
14 class VehicleType3D;
15
16 class Vehicle3D: public Object3D, public Msp::GL::ObjectInstance
17 {
18 private:
19         Layout3D &layout;
20         Vehicle &vehicle;
21         const VehicleType3D &type;
22         std::vector<Axle3D *> axles;
23         std::vector<Bogie3D *> bogies;
24         std::vector<Rod3D *> rods;
25
26 public:
27         Vehicle3D(Layout3D &, Vehicle &);
28         ~Vehicle3D();
29
30         Vehicle &get_vehicle() const { return vehicle; }
31         const VehicleType3D &get_type() const { return type; }
32
33         virtual Vector get_node() const;
34         virtual bool is_visible() const;
35
36         virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
37         virtual void setup_render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
38 };
39
40 } // namespace R2C2
41
42 #endif