19 #ifndef GLCOMPLEXPOLYGON_H
20 #define GLCOMPLEXPOLYGON_H
26 #include <tulip/Color.h>
27 #include <tulip/Coord.h>
28 #include <tulip/tulipconf.h>
29 #include <tulip/GlSimpleEntity.h>
92 GlComplexPolygon(
const std::vector<Coord> &coords, Color fcolor,
int polygonEdgesType = 0,
93 const std::string &textureName =
"",
bool textured =
true);
99 GlComplexPolygon(
const std::vector<Coord> &coords, Color fcolor, Color ocolor,
100 int polygonEdgesType = 0,
const std::string &textureName =
"",
101 bool textured =
true);
107 GlComplexPolygon(
const std::vector<std::vector<Coord>> &coords, Color fcolor,
108 int polygonEdgesType = 0,
const std::string &textureName =
"",
109 bool textured =
true);
115 GlComplexPolygon(
const std::vector<std::vector<Coord>> &coords, Color fcolor, Color ocolor,
116 int polygonEdgesType = 0,
const std::string &textureName =
"",
117 bool textured =
true);
124 void draw(
float lod, Camera *camera)
override;
129 void setOutlineMode(
const bool);
134 void setOutlineSize(
double size);
161 outlineColor = color;
187 std::string getTextureName();
192 void setTextureName(
const std::string &name);
204 void setTextureActivation(
bool);
220 void activateQuadBorder(
const float borderWidth,
const Color &color,
221 const std::string &texture =
"",
const int position = 1,
222 const float texCoordFactor = 1.f,
const int polygonId = 0);
227 void deactivateQuadBorder(
const int polygonId = 0);
232 void translate(
const Coord &mouvement)
override;
237 void getXML(std::string &outString)
override;
242 virtual void getXMLOnlyData(std::string &outString);
247 void setWithXML(
const std::string &inString,
unsigned int ¤tPosition)
override;
249 const std::vector<std::vector<Coord>> &getPolygonSides()
const {
257 virtual void addPoint(
const Coord &point);
261 virtual void beginNewHole();
263 void runTesselation();
264 void createPolygon(
const std::vector<Coord> &coords,
int polygonEdgesType);
266 std::vector<std::vector<Coord>> points;
267 std::vector<std::vector<float>> pointsIdx;
268 std::vector<float> verticesData;
269 std::vector<unsigned int> verticesIndices;
275 std::string textureName;
278 std::vector<bool> quadBorderActivated;
279 std::vector<float> quadBorderWidth;
280 std::vector<Color> quadBorderColor;
281 std::vector<std::string> quadBorderTexture;
282 std::vector<int> quadBorderPosition;
283 std::vector<float> quadBorderTexFactor;