]> git.tdb.fi Git - r2c2.git/blob - source/3d/vehicle.h
Do not render unplaced vehicles
[r2c2.git] / source / 3d / vehicle.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 LIBMARKLIN3D_VEHICLE_H_
9 #define LIBMARKLIN3D_VEHICLE_H_
10
11 #include <msp/gl/renderable.h>
12 #include "libmarklin/vehicle.h"
13 #include "object.h"
14
15 namespace Marklin {
16
17 class Layout3D;
18 class VehicleType3D;
19
20 class Vehicle3D: public Object3D, public Msp::GL::Renderable
21 {
22 private:
23         Layout3D &layout;
24         Vehicle &vehicle;
25         const VehicleType3D &type;
26
27 public:
28         Vehicle3D(Layout3D &, Vehicle &);
29         ~Vehicle3D();
30
31         Vehicle &get_vehicle() const { return vehicle; }
32
33         virtual Point get_node() const;
34         virtual bool is_visible() const;
35
36         virtual void render(const Msp::GL::Tag &) const;
37 };
38
39 } // namespace Marklin
40
41 #endif