]> git.tdb.fi Git - r2c2.git/blob - source/designer/selectionwrap.h
Make use of the geometry part of libmspmath
[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                 Msp::GL::Mesh *mesh;
19         };
20
21         Selection &selection;
22         std::map<const R2C2::ObjectType *, Msp::GL::Mesh *> meshes;
23         std::list<Wrap> wraps;
24
25 public:
26         SelectionWrap(Selection &);
27         ~SelectionWrap();
28
29         virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
30
31 private:
32         void selection_changed();
33         Msp::GL::Mesh &get_mesh(const R2C2::ObjectType &);
34 };
35
36 #endif