Tulip 5.7.1
Large graphs analysis and drawing
Loading...
Searching...
No Matches
EdgeExtremityGlyph.h
1/*
2 *
3 * This file is part of Tulip (https://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 EDGEEXTREMITYGLYPH_H_
22#define EDGEEXTREMITYGLYPH_H_
23
24#include <tulip/Edge.h>
25#include <tulip/Node.h>
26#include <tulip/Size.h>
27#include <tulip/Coord.h>
28#include <tulip/Matrix.h>
29#include <tulip/Plugin.h>
30
31namespace tlp {
32
33class Color;
34
35static const std::string EEGLYPH_CATEGORY = "Edge extremity";
36
37typedef Matrix<float, 4> MatrixGL;
38class GlGraphInputData;
39
40class TLP_GL_SCOPE EdgeExtremityGlyph : public Plugin {
41public:
42 std::string category() const override {
43 return EEGLYPH_CATEGORY;
44 }
45 std::string icon() const override {
46 return ":/tulip/gui/icons/32/plugin_glyph.png";
47 }
48
49 EdgeExtremityGlyph(const tlp::PluginContext *context);
50 ~EdgeExtremityGlyph() override;
51 virtual void draw(edge e, node n, const Color &glyphColor, const Color &borderColor,
52 float lod) = 0;
53 void get2DTransformationMatrix(const Coord &src, const Coord &dest, const Size &glyphSize,
54 MatrixGL &transformationMatrix, MatrixGL &scalingMatrix);
55 void get3DTransformationMatrix(const Coord &src, const Coord &dest, const Size &glyphSize,
56 MatrixGL &transformationMatrix, MatrixGL &scalingMatrix);
57
58protected:
59 GlGraphInputData *edgeExtGlGraphInputData;
60};
61} // namespace tlp
62
63#endif /* EDGEEXTREMITYGLYPH_H_ */
64///@endcond
Contains runtime parameters for a plugin.
Definition: PluginContext.h:42