Tulip 5.7.1
Large graphs analysis and drawing
Loading...
Searching...
No Matches
GlMetaNodeRenderer.h
1/*
2 *
3 * This file is part of Tulip (https://tulip.labri.fr)
4 *
5 * Authors: David Auber and the Tulip development Team
6 * from LaBRI, University of Bordeaux
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 <unordered_map>
27
28namespace tlp {
29
30class GlGraphInputData;
31class Camera;
32class Graph;
33class GlScene;
34
35/**
36 * Class used to render a meta node
37 */
38class TLP_GL_SCOPE GlMetaNodeRenderer : public Observable {
39
40public:
41 GlMetaNodeRenderer(GlGraphInputData *inputData);
42
43 ~GlMetaNodeRenderer() override;
44
45 virtual void render(node, float, Camera *);
46
47 virtual void setInputData(GlGraphInputData *inputData);
48
49 virtual GlGraphInputData *getInputData() const;
50
51 GlScene *getSceneForMetaGraph(Graph *g) const;
52
53protected:
54 void clearScenes();
55
56 void treatEvent(const Event &) override;
57
58 virtual GlScene *createScene(Graph *) const;
59
60private:
61 GlGraphInputData *_inputData;
62 std::unordered_map<Graph *, GlScene *> _metaGraphToSceneMap;
63};
64} // namespace tlp
65
66#endif // Tulip_GLMETANODERENDERER_H
67///@endcond