Tulip  4.6.0
Better Visualization Through Research
library/tulip-ogl/include/tulip/EdgeExtremityGlyph.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 
00022 #ifndef EDGEEXTREMITYGLYPH_H_
00023 #define EDGEEXTREMITYGLYPH_H_
00024 
00025 #include <tulip/Size.h>
00026 #include <tulip/Coord.h>
00027 #include <tulip/Matrix.h>
00028 #include <tulip/Plugin.h>
00029 
00030 namespace tlp {
00031 
00032 class Color;
00033 
00034 static const std::string EEGLYPH_CATEGORY = "Edge extremity";
00035 
00036 typedef Matrix<float, 4> MatrixGL;
00037 class GlGraphInputData;
00038 
00039 class TLP_GL_SCOPE EdgeExtremityGlyph: public Plugin {
00040 public:
00041   virtual std::string category() const {
00042     return EEGLYPH_CATEGORY;
00043   }
00044   std::string icon() const {
00045     return ":/tulip/gui/icons/32/plugin_glyph.png";
00046   }
00047 
00048   EdgeExtremityGlyph(const tlp::PluginContext *context);
00049   virtual ~EdgeExtremityGlyph();
00050   virtual void draw(edge e, node n, const Color& glyphColor,const Color &borderColor, float lod) = 0;
00051   void get2DTransformationMatrix(const Coord &src, const Coord &dest,const Size &glyphSize, MatrixGL& transformationMatrix, MatrixGL& scalingMatrix);
00052   void get3DTransformationMatrix(const Coord &src, const Coord &dest,const Size &glyphSize, MatrixGL& transformationMatrix, MatrixGL& scalingMatrix);
00053 protected:
00054   GlGraphInputData *edgeExtGlGraphInputData;
00055 };
00056 
00057 }
00058 
00059 #endif /* EDGEEXTREMITYGLYPH_H_ */
00060 ///@endcond
 All Classes Files Functions Variables Enumerations Enumerator Properties