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> 89 GlComplexPolygon(
const std::vector<Coord> &coords,Color fcolor,
int polygonEdgesType=0,
const std::string &textureName =
"");
93 GlComplexPolygon(
const std::vector<Coord> &coords,Color fcolor,Color ocolor,
int polygonEdgesType=0,
const std::string &textureName =
"");
97 GlComplexPolygon(
const std::vector<std::vector<Coord> >&coords,Color fcolor,
int polygonEdgesType=0,
const std::string &textureName =
"");
101 GlComplexPolygon(
const std::vector<std::vector<Coord> >&coords,Color fcolor,Color ocolor,
int polygonEdgesType=0,
const std::string &textureName =
"");
108 virtual void draw(
float lod,
Camera *camera);
113 void setOutlineMode(
const bool);
118 void setOutlineSize(
double size);
170 std::string getTextureName();
175 void setTextureName(
const std::string &name);
189 void activateQuadBorder(
const float borderWidth,
const Color &color,
const std::string &texture =
"",
const int position = 1,
190 const float texCoordFactor = 1.f,
const int polygonId = 0);
195 void desactivateQuadBorder(
const int polygonId = 0);
200 virtual void translate(
const Coord& mouvement);
205 virtual void getXML(std::string &outString);
210 virtual void getXMLOnlyData(std::string &outString);
215 virtual void setWithXML(
const std::string &inString,
unsigned int ¤tPosition);
217 const std::vector<std::vector<Coord> > &getPolygonSides()
const {
227 virtual void addPoint(
const Coord& point);
231 virtual void beginNewHole();
233 void runTesselation();
234 void createPolygon(
const std::vector<Coord> &coords,
int polygonEdgesType);
236 std::vector<std::vector<Coord> > points;
237 std::vector<std::vector<float> > pointsIdx;
238 std::vector<float> verticesData;
239 std::vector<unsigned int> verticesIndices;
245 std::string textureName;
247 std::vector<bool> quadBorderActivated;
248 std::vector<float> quadBorderWidth;
249 std::vector<Color> quadBorderColor;
250 std::vector<std::string> quadBorderTexture;
251 std::vector<int> quadBorderPosition;
252 std::vector<float> quadBorderTexFactor;
Color getOutlineColor() const
Get outline color of GlComplexPolygon.
Base class for all Tulip OpenGL entities.
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.
Color getFillColor() const
Get fill color of GlComplexPolygon.
float getTextureZoom()
Get the texture zoom factor.
void setFillColor(const Color &color)
Set fill color of GlComplexPolygon.
void setOutlineColor(const Color &color)
Set outline color of GlComplexPolygon.
GlComplexPolygon()
Default constructor.