Tulip  4.6.0
Better Visualization Through Research
library/tulip-ogl/include/tulip/GlGraphHighDetailsRenderer.h
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_GLGRAPHHIGHDETAILSRENDERER_H
00022 #define Tulip_GLGRAPHHIGHDETAILSRENDERER_H
00023 
00024 #include <tulip/GlGraphRenderer.h>
00025 
00026 #include <map>
00027 
00028 namespace tlp {
00029 
00030 class Graph;
00031 class GlScene;
00032 struct OcclusionTest;
00033 
00034 /** \brief Class to display graph with old rendering engine
00035  *
00036  * This class display graph with :
00037  *  - Nodes and edges shapes
00038  *  - LOD system
00039  * With this renderer you can perform selection
00040  *
00041  * See GlGraphRenderer documentation for functions documentations
00042  */
00043 class TLP_GL_SCOPE GlGraphHighDetailsRenderer : public GlGraphRenderer {
00044 
00045 public:
00046 
00047   GlGraphHighDetailsRenderer(const GlGraphInputData *inputData);
00048   GlGraphHighDetailsRenderer(const GlGraphInputData *inputData,GlScene *scene);
00049 
00050   ~GlGraphHighDetailsRenderer();
00051 
00052   virtual void draw(float lod,Camera* camera);
00053 
00054   virtual void selectEntities(Camera *camera,RenderingEntitiesFlag type, int x, int y, int w, int h, std::vector<SelectedEntity>& selectedEntities);
00055 
00056 protected:
00057 
00058   void initSelectionRendering(RenderingEntitiesFlag type, int x, int y, int w, int h, std::map<unsigned int, SelectedEntity> &idMap,unsigned int &currentId);
00059 
00060   void buildSortedList();
00061 
00062   void drawLabelsForComplexEntities(bool drawSelected,OcclusionTest *occlusionTest,LayerLODUnit &layerLODUnit);
00063 
00064   GlLODCalculator *lodCalculator;
00065 
00066 
00067   GlScene *baseScene;
00068   GlScene *fakeScene;
00069   Vec4i selectionViewport;
00070 };
00071 }
00072 
00073 #endif
00074 ///@endcond
 All Classes Files Functions Variables Enumerations Enumerator Properties