Tulip  4.6.0
Better Visualization Through Research
library/tulip-ogl/include/tulip/GlStar.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 
00020 #ifndef GLREGULARSTAR_H
00021 #define GLREGULARSTAR_H
00022 
00023 #include <tulip/Size.h>
00024 #include <tulip/GlComplexPolygon.h>
00025 
00026 namespace tlp {
00027 
00028 /**
00029  * @ingroup OpenGL
00030  * @brief class to create a star
00031  */
00032 class TLP_GL_SCOPE GlStar : public GlComplexPolygon {
00033 public:
00034   /**
00035    * @brief Constructor
00036    *
00037    * The outline is the border of the regular star
00038    *
00039    * The fill is inside the regular star
00040    */
00041   GlStar(const Coord &position,
00042          const Size &size,
00043          unsigned int numberOfStarPoints,
00044          const Color &fillColor = Color (0, 0, 255),
00045          const Color &outlineColor = Color(0, 0, 0),
00046          bool outlined =true,
00047          const std::string &textureName="",
00048          float outlineSize=1.);
00049   /**
00050    * @brief Destructor
00051    */
00052   virtual ~GlStar();
00053 
00054   /**
00055    * @brief Get the number of star points
00056    */
00057   unsigned int getNumberOfStarPoints();
00058 
00059 protected :
00060 
00061   void computeStar();
00062 
00063 
00064   Coord position;
00065   Size size;
00066   unsigned int numberOfStarPoints;
00067 };
00068 
00069 }
00070 #endif
 All Classes Files Functions Variables Enumerations Enumerator Properties