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);
 
  100                    int polygonEdgesType = 0, 
const std::string &textureName = 
"",
 
  101                    bool textured = 
true);
 
  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);
 
  166     outlineColor = color;
 
  226                           const std::string &texture = 
"", 
const int position = 1,
 
  227                           const float texCoordFactor = 1.f, 
const int polygonId = 0);
 
  242   void getXML(std::string &outString) 
override;
 
  252   void setWithXML(
const std::string &inString, 
unsigned int ¤tPosition) 
override;
 
  254   const std::vector<std::vector<Coord>> &getPolygonSides()
 const {
 
  268   void runTesselation();
 
  269   void createPolygon(
const std::vector<Coord> &coords, 
int polygonEdgesType);
 
  271   std::vector<std::vector<Coord>> points;
 
  272   std::vector<std::vector<float>> pointsIdx;
 
  273   std::vector<float> verticesData;
 
  274   std::vector<unsigned int> verticesIndices;
 
  276   bool outlined, outlineStippled, textured;
 
  280   std::string textureName;
 
  282   std::vector<bool> quadBorderActivated;
 
  283   std::vector<float> quadBorderWidth;
 
  284   std::vector<Color> quadBorderColor;
 
  285   std::vector<std::string> quadBorderTexture;
 
  286   std::vector<int> quadBorderPosition;
 
  287   std::vector<float> quadBorderTexFactor;
 
Tulip OpenGL camera object.
 
Class to create a complex polygon (concave polygon or polygon with hole) If you want to create a comp...
 
GlComplexPolygon(const std::vector< Coord > &coords, Color fcolor, Color ocolor, int polygonEdgesType=0, const std::string &textureName="", bool textured=true)
Constructor with a vector of coords, a fill color, an outline color, a polygon edges type(0 -> straig...
 
void getXML(std::string &outString) override
Function to export data and type outString (in XML format)
 
void setTextureActivation(bool)
set if texture must be applied
 
virtual void getXMLOnlyData(std::string &outString)
Function to export data in outString (in XML format)
 
void draw(float lod, Camera *camera) override
Draw the complex polygon.
 
virtual void beginNewHole()
Begin a new hole in the polygon.
 
void setTextureName(const std::string &name)
Set the textureName.
 
float getTextureZoom()
Get the texture zoom factor.
 
GlComplexPolygon(const std::vector< std::vector< Coord >> &coords, Color fcolor, Color ocolor, int polygonEdgesType=0, const std::string &textureName="", bool textured=true)
Constructor with a vector of vector of coords (the first vector of coord is the polygon and others ve...
 
void setTextureZoom(float zoom)
Set the texture zoom factor.
 
Color getFillColor() const
Get fill color of GlComplexPolygon.
 
void setOutlineColor(const Color &color)
Set outline color of GlComplexPolygon.
 
void setOutlineMode(const bool)
Set if the polygon is outlined or not.
 
std::string getTextureName()
Get the textureName.
 
bool textureActivation()
indicates if texture must be applied
 
Color getOutlineColor() const
Get outline color of GlComplexPolygon.
 
void translate(const Coord &mouvement) override
Translate entity.
 
GlComplexPolygon()
Default constructor.
 
virtual void addPoint(const Coord &point)
Add a new point in polygon.
 
void setFillColor(const Color &color)
Set fill color of GlComplexPolygon.
 
void activateQuadBorder(const float borderWidth, const Color &color, const std::string &texture="", const int position=1, const float texCoordFactor=1.f, const int polygonId=0)
Draw a thick (textured) border around the polygon.
 
GlComplexPolygon(const std::vector< Coord > &coords, Color fcolor, int polygonEdgesType=0, const std::string &textureName="", bool textured=true)
Constructor with a vector of coords, a fill color, a polygon edges type(0 -> straight lines,...
 
void setWithXML(const std::string &inString, unsigned int ¤tPosition) override
Function to set data with inString (in XML format)
 
void setOutlineStippled(bool stippled)
Set if the outline is stippled or not.
 
void deactivateQuadBorder(const int polygonId=0)
Deactivate the textured quad border.
 
void setOutlineSize(double size)
Set size of outline.
 
GlComplexPolygon(const std::vector< std::vector< Coord >> &coords, Color fcolor, int polygonEdgesType=0, const std::string &textureName="", bool textured=true)
Constructor with a vector of vector of coords (the first vector of coord is the polygon and others ve...
 
Base class for all Tulip OpenGL entities.