X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Foverlay.h;h=7e327c74a37dc0d99c04ab5840aa8a92fd06c4eb;hb=95339ab1d15219938c7b2945f4f558dc162c9127;hp=0a9a0223efad695ae266187cea6416e890673925;hpb=a861c2729a356173059177a0b800de2b31c9b49c;p=r2c2.git diff --git a/source/3d/overlay.h b/source/3d/overlay.h index 0a9a022..7e327c7 100644 --- a/source/3d/overlay.h +++ b/source/3d/overlay.h @@ -1,22 +1,14 @@ -/* $Id$ +#ifndef R2C2_3D_OVERLAY_H_ +#define R2C2_3D_OVERLAY_H_ -This file is part of the MSP Märklin suite -Copyright © 2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - -#ifndef MARKLIN3D_OVERLAY_H_ -#define MARKLIN3D_OVERLAY_H_ - -#include #include #include #include #include -namespace Marklin { +namespace R2C2 { -class Track3D; +class Object3D; class Overlay3D: public Msp::GL::Renderable { @@ -27,34 +19,33 @@ private: std::string label; float width; Msp::GL::Mesh background; + Msp::GL::Mesh text; Icon(); }; - const Msp::Graphics::Window &window; - const Msp::GL::Camera &camera; const Msp::GL::Font &font; std::map graphics; - std::map icons; + std::map icons; public: - Overlay3D(const Msp::Graphics::Window &, const Msp::GL::Camera &, const Msp::GL::Font &); + Overlay3D(const Msp::GL::Font &); ~Overlay3D(); - void set_label(const Track3D &, const std::string &); - void add_graphic(const Track3D &, const std::string &); - void remove_graphic(const Track3D &, const std::string &); - void clear_graphics(const Track3D &); - void clear(const Track3D &); + void set_label(const Object3D &, const std::string &); + void add_graphic(const Object3D &, const std::string &); + void remove_graphic(const Object3D &, const std::string &); + void clear_graphics(const Object3D &); + void clear(const Object3D &); - virtual void render(const Msp::GL::Tag &) const; + virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const; private: - Icon &get_icon(const Track3D &); + Icon &get_icon(const Object3D &); const Msp::GL::Mesh *get_graphic(const std::string &); void update_icon(Icon &); }; -} // namespace Marklin +} // namespace R2C2 #endif