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