Tulip  5.2.0
Large graphs analysis and drawing
GlFeedBackBuilder.h
1 /*
2  *
3  * This file is part of Tulip (http://tulip.labri.fr)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux
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_GLFEEDBACKBUILDER_H
22 #define Tulip_GLFEEDBACKBUILDER_H
23 
24 #include <tulip/OpenGlIncludes.h>
25 
26 #include <tulip/tulipconf.h>
27 #include <tulip/Vector.h>
28 
29 namespace tlp {
30 
31 //====================================================
32 typedef struct _FeedBack3Dcolor {
33  GLfloat x;
34  GLfloat y;
35  GLfloat z;
36  GLfloat red;
37  GLfloat green;
38  GLfloat blue;
39  GLfloat alpha;
40 } Feedback3Dcolor;
41 
42 //====================================================
43 typedef struct _DepthIndex {
44  GLfloat *ptr;
45  GLfloat depth;
46 } DepthIndex;
47 
48 //====================================================
49 /**
50  * Abstract class used to build a object with a OpenGl feedback buffer
51  */
52 class TLP_GL_SCOPE GlFeedBackBuilder {
53 
54 public:
55  virtual ~GlFeedBackBuilder() {}
56 
57  virtual void begin(const Vector<int, 4> &, GLfloat *, GLfloat, GLfloat) {}
58  virtual void passThroughToken(GLfloat *) {}
59  virtual void pointToken(GLfloat *) {}
60  virtual void lineToken(GLfloat *) {}
61  virtual void lineResetToken(GLfloat *) {}
62  virtual void polygonToken(GLfloat *) {}
63  virtual void bitmapToken(GLfloat *) {}
64  virtual void drawPixelToken(GLfloat *) {}
65  virtual void copyPixelToken(GLfloat *) {}
66  virtual void end() {}
67 
68  virtual void getResult(std::string *str) = 0;
69 };
70 }
71 
72 #endif // Tulip_GLFEEDBACKBUILDER_H
73 ///@endcond