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 =
"");
99 GlComplexPolygon(
const std::vector<Coord> &coords, Color fcolor, Color ocolor,
100 int polygonEdgesType = 0,
const std::string &textureName =
"");
106 GlComplexPolygon(
const std::vector<std::vector<Coord>> &coords, Color fcolor,
107 int polygonEdgesType = 0,
const std::string &textureName =
"");
113 GlComplexPolygon(
const std::vector<std::vector<Coord>> &coords, Color fcolor, Color ocolor,
114 int polygonEdgesType = 0,
const std::string &textureName =
"");
121 void draw(
float lod,
Camera *camera)
override;
126 void setOutlineMode(
const bool);
131 void setOutlineSize(
double size);
158 outlineColor = color;
184 std::string getTextureName();
189 void setTextureName(
const std::string &name);
205 void activateQuadBorder(
const float borderWidth,
const Color &color,
206 const std::string &texture =
"",
const int position = 1,
207 const float texCoordFactor = 1.f,
const int polygonId = 0);
212 void deactivateQuadBorder(
const int polygonId = 0);
217 void translate(
const Coord &mouvement)
override;
222 void getXML(std::string &outString)
override;
227 virtual void getXMLOnlyData(std::string &outString);
232 void setWithXML(
const std::string &inString,
unsigned int ¤tPosition)
override;
234 const std::vector<std::vector<Coord>> &getPolygonSides()
const {
242 virtual void addPoint(
const Coord &point);
246 virtual void beginNewHole();
248 void runTesselation();
249 void createPolygon(
const std::vector<Coord> &coords,
int polygonEdgesType);
251 std::vector<std::vector<Coord>> points;
252 std::vector<std::vector<float>> pointsIdx;
253 std::vector<float> verticesData;
254 std::vector<unsigned int> verticesIndices;
260 std::string textureName;
262 std::vector<bool> quadBorderActivated;
263 std::vector<float> quadBorderWidth;
264 std::vector<Color> quadBorderColor;
265 std::vector<std::string> quadBorderTexture;
266 std::vector<int> quadBorderPosition;
267 std::vector<float> quadBorderTexFactor;
Base class for all Tulip OpenGL entities.
Color getOutlineColor() const
Get outline color of GlComplexPolygon.
void setTextureZoom(float zoom)
Set the texture zoom factor.
Class to create a complex polygon (concave polygon or polygon with hole) If you want to create a comp...
Tulip OpenGL camera object.
float getTextureZoom()
Get the texture zoom factor.
Color getFillColor() const
Get fill color of GlComplexPolygon.
void setFillColor(const Color &color)
Set fill color of GlComplexPolygon.
void setOutlineColor(const Color &color)
Set outline color of GlComplexPolygon.
GlComplexPolygon()
Default constructor.