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