]> git.tdb.fi Git - r2c2.git/blob - source/designer/terraintool.h
Add editable terrain objects
[r2c2.git] / source / designer / terraintool.h
1 #ifndef TERRAINTOOL_H_
2 #define TERRAINTOOL_H_
3
4 #include <msp/gl/mesh.h>
5 #include <msp/gl/renderable.h>
6 #include "libr2c2/terrain.h"
7 #include "tool.h"
8
9 class TerrainTool: public Tool, public Msp::GL::Renderable
10 {
11 private:
12         R2C2::Terrain &terrain;
13         Msp::GL::Mesh marker;
14         R2C2::Terrain::NodeCoordinates highlight_node;
15         R2C2::Vector marker_position;
16         bool dragging;
17         float drag_start;
18
19 public:
20         TerrainTool(Designer &, Msp::Input::Keyboard &, Msp::Input::Mouse &, R2C2::Terrain &);
21         virtual ~TerrainTool();
22
23 private:
24         virtual void button_press(unsigned);
25         virtual void button_release(unsigned);
26         virtual void pointer_motion();
27
28 public:
29         virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
30 };
31
32 #endif