3 This file is part of R²C²
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef R2C2_3D_OVERLAY_H_
9 #define R2C2_3D_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;
35 const Msp::GL::Font &font;
36 std::map<std::string, Msp::GL::Mesh *> graphics;
37 std::map<const Object3D *, Icon *> icons;
40 Overlay3D(const Msp::GL::Font &);
43 void set_label(const Object3D &, const std::string &);
44 void add_graphic(const Object3D &, const std::string &);
45 void remove_graphic(const Object3D &, const std::string &);
46 void clear_graphics(const Object3D &);
47 void clear(const Object3D &);
49 virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
52 Icon &get_icon(const Object3D &);
53 const Msp::GL::Mesh *get_graphic(const std::string &);
54 void update_icon(Icon &);