Tulip  4.7.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
GlStar.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 
20 #ifndef GLREGULARSTAR_H
21 #define GLREGULARSTAR_H
22 
23 #include <tulip/Size.h>
24 #include <tulip/GlComplexPolygon.h>
25 
26 namespace tlp {
27 
28 /**
29  * @ingroup OpenGL
30  * @brief class to create a star
31  */
32 class TLP_GL_SCOPE GlStar : public GlComplexPolygon {
33 public:
34  /**
35  * @brief Constructor
36  *
37  * The outline is the border of the regular star
38  *
39  * The fill is inside the regular star
40  */
41  GlStar(const Coord &position,
42  const Size &size,
43  unsigned int numberOfStarPoints,
44  const Color &fillColor = Color (0, 0, 255),
45  const Color &outlineColor = Color(0, 0, 0),
46  bool outlined =true,
47  const std::string &textureName="",
48  float outlineSize=1.);
49  /**
50  * @brief Destructor
51  */
52  virtual ~GlStar();
53 
54  /**
55  * @brief Get the number of star points
56  */
57  unsigned int getNumberOfStarPoints();
58 
59 protected :
60 
61  void computeStar();
62 
63 
64  Coord position;
65  Size size;
66  unsigned int numberOfStarPoints;
67 };
68 
69 }
70 #endif
Class to create a complex polygon (concave polygon or polygon with hole) If you want to create a comp...
class to create a star
Definition: GlStar.h:32