21 #ifndef GLABSTRACTPOLYGON_H
22 #define GLABSTRACTPOLYGON_H
26 #include <tulip/Color.h>
27 #include <tulip/Coord.h>
28 #include <tulip/GlSimpleEntity.h>
34 #if defined(__APPLE__)
35 #include <OpenGL/gl.h>
61 enum PolygonMode {POLYGON = 0, QUAD_STRIP = 1};
66 PolygonMode getPolygonMode();
71 void setPolygonMode(PolygonMode mode);
81 void setFillMode(
const bool);
86 bool getOutlineMode();
91 void setOutlineMode(
const bool);
96 bool getLightingMode();
101 void setLightingMode(
const bool);
106 Color getFillColor(
unsigned int i);
111 void setFillColor(
unsigned int i,
const Color &color);
118 void setFillColor(
const Color &color);
125 Color getOutlineColor(
unsigned int i);
130 void setOutlineColor(
unsigned int i,
const Color &color);
137 void setOutlineColor(
const Color &color);
142 std::string getTextureName();
147 void setTextureName(
const std::string &name);
152 float getOutlineSize();
157 void setOutlineSize(
float size);
164 float getHideOutlineLod();
169 void setHideOutlineLod(
float lod);
174 virtual void draw(
float lod,
Camera *camera);
179 virtual void translate(
const Coord& mouvement);
184 virtual void getXML(std::string &outString);
189 virtual void getXMLOnlyData(std::string &outString);
194 virtual void setWithXML(
const std::string &outString,
unsigned int ¤tPosition);
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;