X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=inline;f=source%2Fengineer%2Fengineer.h;h=3e7a9109b7523ea6cba7b6dfb5a0d546048ef34e;hb=bc8ac89bbe774bb133b758416182aa18e5e0a5a5;hp=8e8e0216b21ef3a866c0d25b73a42e97e20e228e;hpb=7587f018794f53974409a2aad76a0a421cea2d24;p=r2c2.git diff --git a/source/engineer/engineer.h b/source/engineer/engineer.h index 8e8e021..3e7a910 100644 --- a/source/engineer/engineer.h +++ b/source/engineer/engineer.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of the MSP Märklin suite -Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa +Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -9,8 +9,11 @@ Distributed under the GPL #define ENGINEER_H_ #include -#include -#include +#include +#include +#include +#include +#include #include #include #include "libmarklin/catalogue.h" @@ -19,6 +22,7 @@ Distributed under the GPL #include "libmarklin/trafficmanager.h" #include "libmarklin/train.h" #include "3d/layout.h" +#include "3d/overlay.h" #include "network/server.h" class MainPanel; @@ -28,12 +32,7 @@ class TrainProperties; class Engineer: public Msp::Application { private: - Msp::Graphics::Display *dpy; - Msp::Graphics::Window *wnd; - Msp::Graphics::GLContext *glc; - unsigned screen_w; - unsigned screen_h; - bool fullscreen; + Msp::Graphics::SimpleGLWindow *window; Msp::GLtk::Resources ui_res; Msp::GLtk::Root *root; @@ -44,9 +43,14 @@ private: Marklin::TrafficManager *trfc_mgr; Marklin::Server *server; Msp::IO::EventDispatcher event_disp; + Marklin::Overlay3D *overlay; + std::list new_trains; - Marklin::Point cam_pos; - float cam_rot; + Msp::GL::Camera camera; + Msp::GL::Lighting lighting; + Msp::GL::Light light; + Msp::GL::Pipeline *pipeline; + Msp::GL::Mesh arrow_mesh; MainPanel *main_panel; std::list train_panels; @@ -54,7 +58,6 @@ private: Marklin::Block *placing_block; unsigned placing_entry; - bool no_lighting; bool simulate; public: @@ -73,16 +76,15 @@ public: private: void tick(); void button_press(int, int, unsigned, unsigned); - void button_release(int, int, unsigned, unsigned); void pointer_motion(int, int); void view_all(); void set_block_color(const Marklin::Block &, const Msp::GL::Color &); void reset_block_color(const Marklin::Block &); void sensor_event(bool, Marklin::Sensor *); void block_reserved(const Marklin::Block &, const Marklin::Train *); - void project_3d(); Marklin::Track3D *pick_track(int, int); void train_added(Marklin::Train &); + virtual void sighandler(int); static Msp::Application::RegApp reg; };