![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 #ifndef Tulip_GLMETANODERENDERER_H 00022 #define Tulip_GLMETANODERENDERER_H 00023 00024 #include <tulip/tulipconf.h> 00025 #include <tulip/Observable.h> 00026 #include <map> 00027 00028 namespace tlp { 00029 00030 class GlGraphInputData; 00031 class Camera; 00032 class Graph; 00033 class GlScene; 00034 00035 /** 00036 * Class used to render a meta node 00037 */ 00038 class TLP_GL_SCOPE GlMetaNodeRenderer : public Observable { 00039 00040 public: 00041 00042 GlMetaNodeRenderer(GlGraphInputData *inputData); 00043 00044 virtual ~GlMetaNodeRenderer(); 00045 00046 virtual void render(node,float,Camera*); 00047 00048 virtual void setInputData(GlGraphInputData *inputData); 00049 00050 virtual GlGraphInputData *getInputData() const; 00051 00052 GlScene* getSceneForMetaGraph(Graph *g) const; 00053 00054 protected: 00055 00056 void clearScenes(); 00057 00058 void treatEvent(const Event&); 00059 00060 virtual GlScene* createScene(Graph*) const; 00061 00062 private: 00063 00064 GlGraphInputData *_inputData; 00065 std::map<Graph *,GlScene *> _metaGraphToSceneMap; 00066 00067 }; 00068 00069 } 00070 00071 #endif // Tulip_GLMETANODERENDERER_H 00072 ///@endcond