Tulip  4.2.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
GlGraphHighDetailsRenderer.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_GLGRAPHHIGHDETAILSRENDERER_H
22 #define Tulip_GLGRAPHHIGHDETAILSRENDERER_H
23 
24 #include <tulip/GlGraphRenderer.h>
25 
26 #include <vector>
27 
28 #include <tulip/Observable.h>
29 
30 #include <tulip/GlGraphRenderingParameters.h>
31 #include <tulip/GlGraphInputData.h>
32 #include <tulip/GlNode.h>
33 #include <tulip/GlEdge.h>
34 #include <tulip/GlQuadTreeLODCalculator.h>
35 #include <tulip/GlScene.h>
36 
37 namespace tlp {
38 
39 class Graph;
40 
41 
42 /** \brief Class to display graph with old rendering engine
43  *
44  * This class display graph with :
45  * - Nodes and edges shapes
46  * - LOD system
47  * With this renderer you can perform selection
48  *
49  * See GlGraphRenderer documentation for functions documentations
50  */
51 class TLP_GL_SCOPE GlGraphHighDetailsRenderer : public GlGraphRenderer {
52 
53 public:
54 
55  GlGraphHighDetailsRenderer(const GlGraphInputData *inputData);
56  GlGraphHighDetailsRenderer(const GlGraphInputData *inputData,GlScene *scene);
57 
58  ~GlGraphHighDetailsRenderer();
59 
60  virtual void draw(float lod,Camera* camera);
61 
62  virtual void selectEntities(Camera *camera,RenderingEntitiesFlag type,int , int , int , int , std::vector<SelectedEntity>& selectedEntities);
63 
64 protected:
65 
66  void initSelectionRendering(RenderingEntitiesFlag type,std::map<unsigned int, SelectedEntity> &idMap,unsigned int &currentId);
67 
68  void buildSortedList();
69 
70  void drawLabelsForComplexEntities(bool drawSelected,OcclusionTest *occlusionTest,LayerLODUnit &layerLODUnit);
71 
72  GlLODCalculator *lodCalculator;
73 
74 
75  GlScene *baseScene;
76  GlScene *fakeScene;
77 };
78 }
79 
80 #endif
81 ///@endcond