20 #ifndef Tulip_GLLABEL_H
21 #define Tulip_GLLABEL_H
23 #include <tulip/Coord.h>
24 #include <tulip/Color.h>
25 #include <tulip/Size.h>
26 #include <tulip/Camera.h>
27 #include <tulip/GlSimpleEntity.h>
28 #include <tulip/TulipViewSettings.h>
30 class FTGLPolygonFont;
37 #define MIN_LABEL_POSITION LabelPosition::Center
38 #define MAX_LABEL_POSITION LabelPosition::Right
66 GlLabel(Coord centerPosition,Size size,Color fontColor,
bool leftAlign=
false);
83 void setText(
const std::string& text);
89 const std::string& getText()
const;
94 void setPosition(
const Coord &position);
106 virtual void setTranslationAfterRotation(Coord translation) {
107 translationAfterRotation=translation;
113 virtual Coord getTranslationAfterRotation() {
114 return translationAfterRotation;
126 this->alignment=alignment;
142 virtual void setSize(
const Size &size);
147 virtual Size getSize();
157 virtual void setSizeForOutAlign(
const Size &size);
163 virtual Size getSizeForOutAlign();
183 depthTestEnabled=state;
196 void drawWithStencil(
float lod,
Camera *camera=NULL);
201 float getHeightAfterScale();
206 virtual void draw(
float,
Camera *camera=NULL);
211 virtual void translate(
const Coord& mouvement);
216 virtual void rotate(
float xRot,
float yRot,
float zRot);
221 virtual void getXML(std::string &outString);
226 virtual void setWithXML(
const std::string &inString,
unsigned int ¤tPosition);
231 virtual void setBoldFont();
236 virtual void setPlainFont();
241 virtual void setFontName(
const std::string &name);
246 virtual void setFontNameSizeAndColor(
const std::string &name,
const int &size,
const Color &color);
252 virtual void setRenderingMode(
int mode);
260 occlusionTester=tester;
292 labelsDensity=density;
300 return labelsDensity;
346 return useMinMaxSize;
374 outlineColor = color;
416 this->billboarded=billboarded;
422 std::string fontName;
425 FTGLPolygonFont *font;
426 FTOutlineFont *borderFont;
427 Coord centerPosition;
428 Coord translationAfterRotation;
430 Size sizeForOutAlign;
434 std::string textureName;
440 bool depthTestEnabled;
449 OcclusionTest *occlusionTester;
455 std::vector<std::string> textVector;
456 std::vector<float> textWidthVector;