]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/engineer.h
Emit various signals from Train when it's loaded
[r2c2.git] / source / engineer / engineer.h
index 31952ba1f11a9f61dccb9033b2d5be82c4e9ddb5..3e7a9109b7523ea6cba7b6dfb5a0d546048ef34e 100644 (file)
@@ -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 <msp/core/application.h>
-#include <msp/gbase/glcontext.h>
-#include <msp/gl/font.h>
+#include <msp/gbase/simplewindow.h>
+#include <msp/gl/camera.h>
+#include <msp/gl/light.h>
+#include <msp/gl/lighting.h>
+#include <msp/gl/pipeline.h>
 #include <msp/gltk/resources.h>
 #include <msp/gltk/root.h>
 #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<Marklin::Train *> 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<TrainPanel *> train_panels;
@@ -54,7 +58,6 @@ private:
        Marklin::Block *placing_block;
        unsigned placing_entry;
 
-       bool no_lighting;
        bool simulate;
 
 public:
@@ -73,14 +76,12 @@ 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);