Tulip  4.7.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
EdgeExtremityGlyph.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
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 
22 #ifndef EDGEEXTREMITYGLYPH_H_
23 #define EDGEEXTREMITYGLYPH_H_
24 
25 #include <tulip/Size.h>
26 #include <tulip/Coord.h>
27 #include <tulip/Matrix.h>
28 #include <tulip/Plugin.h>
29 
30 namespace tlp {
31 
32 class Color;
33 
34 static const std::string EEGLYPH_CATEGORY = "Edge extremity";
35 
36 typedef Matrix<float, 4> MatrixGL;
37 class GlGraphInputData;
38 
39 class TLP_GL_SCOPE EdgeExtremityGlyph: public Plugin {
40 public:
41  virtual std::string category() const {
42  return EEGLYPH_CATEGORY;
43  }
44  std::string icon() const {
45  return ":/tulip/gui/icons/32/plugin_glyph.png";
46  }
47 
48  EdgeExtremityGlyph(const tlp::PluginContext *context);
49  virtual ~EdgeExtremityGlyph();
50  virtual void draw(edge e, node n, const Color& glyphColor,const Color &borderColor, float lod) = 0;
51  void get2DTransformationMatrix(const Coord &src, const Coord &dest,const Size &glyphSize, MatrixGL& transformationMatrix, MatrixGL& scalingMatrix);
52  void get3DTransformationMatrix(const Coord &src, const Coord &dest,const Size &glyphSize, MatrixGL& transformationMatrix, MatrixGL& scalingMatrix);
53 protected:
54  GlGraphInputData *edgeExtGlGraphInputData;
55 };
56 
57 }
58 
59 #endif /* EDGEEXTREMITYGLYPH_H_ */
60 ///@endcond
Contains runtime parameters for a plugin.
Definition: PluginContext.h:39