20 #ifndef Tulip_GLLABEL_H
21 #define Tulip_GLLABEL_H
25 #include <tulip/Coord.h>
26 #include <tulip/Color.h>
27 #include <tulip/Size.h>
29 #include <tulip/GlSimpleEntity.h>
31 class FTGLPolygonFont;
39 enum LabelPosition {ON_CENTER = 0, ON_TOP = 1, ON_BOTTOM = 2, ON_LEFT = 3, ON_RIGHT = 4};
67 GlLabel(Coord centerPosition,Size size,Color fontColor,
bool leftAlign=
false);
84 void setText(
const std::string& text);
90 const std::string& getText()
const;
95 void setPosition(
const Coord &position);
107 virtual void setTranslationAfterRotation(Coord translation) {
108 translationAfterRotation=translation;
114 virtual Coord getTranslationAfterRotation() {
115 return translationAfterRotation;
127 this->alignment=alignment;
143 virtual void setSize(
const Size &size);
148 virtual Size getSize();
158 virtual void setSizeForOutAlign(
const Size &size);
164 virtual Size getSizeForOutAlign();
184 depthTestEnabled=state;
197 void drawWithStencil(
float lod,
Camera *camera=NULL);
202 float getHeightAfterScale();
207 virtual void draw(
float,
Camera *camera=NULL);
212 virtual void translate(
const Coord& mouvement);
217 virtual void rotate(
float xRot,
float yRot,
float zRot);
222 virtual void getXML(std::string &outString);
227 virtual void setWithXML(
const std::string &inString,
unsigned int ¤tPosition);
232 virtual void setBoldFont();
237 virtual void setPlainFont();
242 virtual void setFontName(
const std::string &name);
247 virtual void setFontNameSizeAndColor(
const std::string &name,
const int &size,
const Color &color);
253 virtual void setRenderingMode(
int mode);
261 occlusionTester=tester;
293 labelsDensity=density;
301 return labelsDensity;
347 return useMinMaxSize;
375 outlineColor = color;
417 this->billboarded=billboarded;
423 std::string fontName;
426 FTGLPolygonFont *font;
427 FTOutlineFont *borderFont;
428 Coord centerPosition;
429 Coord translationAfterRotation;
431 Size sizeForOutAlign;
435 std::string textureName;
441 bool depthTestEnabled;
450 OcclusionTest *occlusionTester;
455 std::vector<std::string> textVector;
456 std::vector<float> textWidthVector;