3 This file is part of the MSP Märklin suite
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef MARKLIN3D_OVERLAY_H_
9 #define MARKLIN3D_OVERLAY_H_
11 #include <msp/gbase/window.h>
12 #include <msp/gl/camera.h>
13 #include <msp/gl/font.h>
14 #include <msp/gl/mesh.h>
15 #include <msp/gl/renderable.h>
21 class Overlay3D: public Msp::GL::Renderable
26 std::vector<const Msp::GL::Mesh *> graphics;
29 Msp::GL::Mesh background;
34 const Msp::Graphics::Window &window;
35 const Msp::GL::Camera &camera;
36 const Msp::GL::Font &font;
37 std::map<std::string, Msp::GL::Mesh *> graphics;
38 std::map<const Object3D *, Icon *> icons;
41 Overlay3D(const Msp::Graphics::Window &, const Msp::GL::Camera &, const Msp::GL::Font &);
44 void set_label(const Object3D &, const std::string &);
45 void add_graphic(const Object3D &, const std::string &);
46 void remove_graphic(const Object3D &, const std::string &);
47 void clear_graphics(const Object3D &);
48 void clear(const Object3D &);
50 virtual void render(const Msp::GL::Tag &) const;
53 Icon &get_icon(const Object3D &);
54 const Msp::GL::Mesh *get_graphic(const std::string &);
55 void update_icon(Icon &);
58 } // namespace Marklin