3 This file is part of R²C²
4 Copyright © 2010-2011 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBR2C23D_VEHICLE_H_
9 #define LIBR2C23D_VEHICLE_H_
11 #include <msp/gl/renderable.h>
12 #include "libr2c2/vehicle.h"
23 class Vehicle3D: public Object3D, public Msp::GL::ObjectInstance
28 const VehicleType3D &type;
29 std::vector<Axle3D *> axles;
30 std::vector<Bogie3D *> bogies;
31 std::vector<Rod3D *> rods;
34 Vehicle3D(Layout3D &, Vehicle &);
37 Vehicle &get_vehicle() const { return vehicle; }
38 const VehicleType3D &get_type() const { return type; }
40 virtual Vector get_node() const;
41 virtual bool is_visible() const;
43 virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
44 virtual void setup_render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;