Tulip  4.2.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
GlLODSceneVisitor.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_GLLODSCENEVISITOR_H
22 #define Tulip_GLLODSCENEVISITOR_H
23 #ifndef DOXYGEN_NOTFOR_DEVEL
24 
25 
26 #include <vector>
27 #include <map>
28 
29 #include <tulip/BoundingBox.h>
30 
31 #include <tulip/GlSceneVisitor.h>
32 
33 namespace tlp {
34 
35 class GlGraphInputData;
36 class GlLODCalculator;
37 
38 /**
39  * Visitor to colect the Bounding box of entities in the scene
40  */
41 class TLP_GL_SCOPE GlLODSceneVisitor : public GlSceneVisitor {
42 
43 public:
44 
45  /**
46  * Basic constructor
47  */
48  GlLODSceneVisitor(GlLODCalculator *calculator,const GlGraphInputData* inputData)
49  : calculator(calculator),inputData(inputData) {
50  threadSafe=true;
51  }
52 
53  /**
54  * Visit a GlSimpleEntity
55  */
56  virtual void visit(GlSimpleEntity *entity);
57  /**
58  * Visit a node
59  */
60  virtual void visit(GlNode *glNode);
61  /**
62  * Visit an Edge
63  */
64  virtual void visit(GlEdge *glEdge);
65  /**
66  * Visit a layer
67  */
68  virtual void visit(GlLayer *layer);
69 
70  /**
71  * Reserve memory to store nodes LOD
72  */
73  virtual void reserveMemoryForNodes(unsigned int numberOfNodes);
74 
75  /**
76  * Reserve memory to store edges LOD
77  */
78  virtual void reserveMemoryForEdges(unsigned int numberOfEdges);
79 
80 private:
81 
82  GlLODCalculator* calculator;
83  const GlGraphInputData* inputData;
84 
85 };
86 
87 }
88 
89 #endif // DOXYGEN_NOTFOR_DEVEL
90 
91 #endif // Tulip_GLLODSCENEVISITOR_H
92 ///@endcond