20 #ifndef GLABSTRACTPOLYGON_H
21 #define GLABSTRACTPOLYGON_H
25 #include <tulip/Color.h>
26 #include <tulip/Coord.h>
27 #include <tulip/Size.h>
28 #include <tulip/GlSimpleEntity.h>
30 #include <tulip/OpenGlIncludes.h>
52 enum PolygonMode { POLYGON = 0, QUAD_STRIP = 1 };
57 PolygonMode getPolygonMode();
62 void setPolygonMode(PolygonMode mode);
72 void setFillMode(
const bool);
77 bool getOutlineMode();
82 void setOutlineMode(
const bool);
87 bool getLightingMode();
92 void setLightingMode(
const bool);
97 Color getFillColor(
unsigned int i);
102 void setFillColor(
unsigned int i,
const Color &color);
109 void setFillColor(
const Color &color);
116 Color getOutlineColor(
unsigned int i);
121 void setOutlineColor(
unsigned int i,
const Color &color);
128 void setOutlineColor(
const Color &color);
133 std::string getTextureName();
138 void setTextureName(
const std::string &name);
143 float getOutlineSize();
148 void setOutlineSize(
float size);
155 float getHideOutlineLod();
160 void setHideOutlineLod(
float lod);
165 void setInvertYTexture(
bool invertYTexture);
170 void draw(
float lod,
Camera *camera)
override;
175 void translate(
const Coord &mouvement)
override;
180 virtual void scale(
const tlp::Size &factor);
185 void getXML(std::string &outString)
override;
190 virtual void getXMLOnlyData(std::string &outString);
195 void setWithXML(
const std::string &outString,
unsigned int ¤tPosition)
override;
205 virtual void setPoints(
const std::vector<Coord> &points);
210 virtual void setPoint(
unsigned int index,
const Coord &point);
215 virtual void setFillColors(
const std::vector<Color> &colors);
220 virtual void setOutlineColors(
const std::vector<Color> &colors);
225 virtual void recomputeBoundingBox();
230 virtual void clearGenerated();
234 PolygonMode polygonMode;
235 std::vector<Coord> points;
236 std::vector<Color> fillColors;
237 std::vector<Color> outlineColors;
242 std::string textureName;
244 float hideOutlineLod;
246 std::vector<Coord> normalArray;