Tulip  4.2.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
GlMetaNodeRenderer.h
1 /*
2  *
3  * This file is part of Tulip (www.tulip-software.org)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux 1 and Inria Bordeaux - Sud Ouest
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 ///@cond DOXYGEN_HIDDEN
20 
21 #ifndef Tulip_GLMETANODERENDERER_H
22 #define Tulip_GLMETANODERENDERER_H
23 
24 #include <tulip/tulipconf.h>
25 #include <tulip/Observable.h>
26 #include <map>
27 
28 namespace tlp {
29 
30 class GlGraphInputData;
31 class Camera;
32 class Graph;
33 class GlScene;
34 
35 /**
36  * Class used to render a meta node
37  */
38 class TLP_GL_SCOPE GlMetaNodeRenderer : public Observable {
39 
40 public:
41 
42  GlMetaNodeRenderer(GlGraphInputData *inputData);
43 
44  virtual ~GlMetaNodeRenderer();
45 
46  virtual void render(node,float,Camera*);
47 
48  virtual void setInputData(GlGraphInputData *inputData);
49 
50  virtual GlGraphInputData *getInputData();
51 
52  GlScene* getSceneForMetaGraph(Graph *g);
53 
54 protected:
55 
56  void clearScenes();
57 
58  void treatEvent(const Event&);
59 
60  virtual GlScene* createScene(Graph*) const;
61 
62 private:
63 
64  GlGraphInputData *_inputData;
65  std::map<Graph *,GlScene *> _metaGraphToSceneMap;
66 
67 };
68 
69 }
70 
71 #endif // Tulip_GLMETANODERENDERER_H
72 ///@endcond