Tulip 5.7.1
Large graphs analysis and drawing
Loading...
Searching...
No Matches
GlStar.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
20#ifndef GLREGULARSTAR_H
21#define GLREGULARSTAR_H
22
23#include <tulip/Size.h>
24#include <tulip/GlComplexPolygon.h>
25
26namespace tlp {
27
28/**
29 * @ingroup OpenGL
30 * @brief class to create a star
31 */
32class TLP_GL_SCOPE GlStar : public GlComplexPolygon {
33public:
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, const Size &size, unsigned int numberOfStarPoints,
42 const Color &fillColor = Color(0, 0, 255), const Color &outlineColor = Color(0, 0, 0),
43 bool outlined = true, const std::string &textureName = "", float outlineSize = 1.);
44 /**
45 * @brief Destructor
46 */
47 ~GlStar() override;
48
49 /**
50 * @brief Get the number of star points
51 */
52 unsigned int getNumberOfStarPoints();
53
54protected:
55 void computeStar();
56
57 Coord position;
58 Size size;
59 unsigned int numberOfStarPoints;
60};
61} // namespace tlp
62#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
unsigned int getNumberOfStarPoints()
Get the number of star points.
~GlStar() override
Destructor.
GlStar(const Coord &position, const Size &size, unsigned int numberOfStarPoints, const Color &fillColor=Color(0, 0, 255), const Color &outlineColor=Color(0, 0, 0), bool outlined=true, const std::string &textureName="", float outlineSize=1.)
Constructor.