]> git.tdb.fi Git - r2c2.git/blob - source/designer/selectionwrap.h
Store zone blocks in order and use add_tracks to load them
[r2c2.git] / source / designer / selectionwrap.h
1 #ifndef SELECTIONWRAP_H_
2 #define SELECTIONWRAP_H_
3
4 #include <msp/gl/mesh.h>
5 #include <msp/gl/renderable.h>
6 #include "libr2c2/object.h"
7 #include "3d/layout.h"
8
9 class Designer;
10 class Selection;
11
12 class SelectionWrap: public Msp::GL::Renderable
13 {
14 private:
15         struct Wrap
16         {
17                 R2C2::Object *object;
18                 const Msp::GL::Mesh *mesh;
19         };
20
21         Selection &selection;
22         std::map<const R2C2::ObjectType *, Msp::GL::Mesh *> meshes;
23         std::map<const R2C2::Object *, Msp::GL::Mesh *> transient_meshes;
24         std::list<Wrap> wraps;
25
26 public:
27         SelectionWrap(Selection &);
28         ~SelectionWrap();
29
30         virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
31
32 private:
33         void selection_changed();
34         const Msp::GL::Mesh &get_mesh(const R2C2::Object &);
35 };
36
37 #endif