![]() |
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_GLSELECTSCENEVISITOR_H 00022 #define Tulip_GLSELECTSCENEVISITOR_H 00023 00024 #include <tulip/GlSceneVisitor.h> 00025 00026 namespace tlp { 00027 00028 enum SelectionFlag { 00029 SelectSimpleEntities=1, 00030 SelectNodes=2, 00031 SelectEdges=4 00032 }; 00033 00034 class GlGraphInputData; 00035 class GlLODCalculator; 00036 00037 /** 00038 * This visitor is use when we want to select an entity in scene 00039 */ 00040 class TLP_GL_SCOPE GlSelectSceneVisitor : public GlSceneVisitor { 00041 00042 public: 00043 00044 /** 00045 * Constructor with SelectionFlac (SelectSimpleEntity, SelectNodes and SelectEdges), GlGraphInputData and GlLODCalculator 00046 */ 00047 GlSelectSceneVisitor(SelectionFlag flag,GlGraphInputData* inputData,GlLODCalculator *calculator); 00048 00049 /** 00050 * Visit a simple entity 00051 */ 00052 virtual void visit(GlSimpleEntity *entity); 00053 /** 00054 * Visit a node 00055 */ 00056 virtual void visit(GlNode *glNode); 00057 /** 00058 * Visit an edge 00059 */ 00060 virtual void visit(GlEdge *glEdge); 00061 /** 00062 * Visit a layer 00063 */ 00064 virtual void visit(GlLayer *layer); 00065 00066 private: 00067 00068 SelectionFlag selectionFlag; 00069 00070 GlGraphInputData* inputData; 00071 00072 GlLODCalculator* calculator; 00073 00074 }; 00075 00076 } 00077 00078 #endif // Tulip_GLSELECTSCENEVISITOR_H 00079 ///@endcond