Tulip
5.0.0
Large graphs analysis and drawing
|
#include <GlLabel.h>
Public Member Functions | |
GlLabel () | |
GlLabel (Coord centerPosition, Size size, Color fontColor, bool leftAlign=false) | |
~GlLabel () | |
virtual void | draw (float, Camera *camera=NULL) |
void | drawWithStencil (float lod, Camera *camera=NULL) |
virtual void | enableDepthTest (bool state) |
virtual BoundingBox | getBoundingBox () |
virtual Color | getColor () |
int | getFontSize () const |
float | getHeightAfterScale () |
virtual int | getLabelDensity () |
int | getMaxSize () |
int | getMinSize () |
Color | getOutlineColor () const |
float | getOutlineSize () const |
Coord | getPosition () |
virtual Size | getSize () |
virtual Size | getSizeForOutAlign () |
const std::string & | getText () const |
virtual BoundingBox | getTextBoundingBox () |
std::string | getTextureName () const |
virtual bool | getUseLODOptimisation () |
virtual void | getXML (std::string &outString) |
bool | isBillboarded () |
bool | isUsingMinMaxSize () |
virtual void | rotate (float xRot, float yRot, float zRot) |
virtual void | setAlignment (int alignment) |
void | setBillboarded (bool billboarded) |
virtual void | setBoldFont () |
virtual void | setColor (const Color &color) |
virtual void | setFontName (const std::string &name) |
virtual void | setFontNameSizeAndColor (const std::string &name, const int &size, const Color &color) |
void | setFontSize (int size) |
virtual void | setLabelsDensity (int density) |
void | setMaxSize (int size) |
void | setMinSize (int size) |
virtual void | setOcclusionTester (OcclusionTest *tester) |
void | setOutlineColor (const Color &color) |
void | setOutlineSize (float size) |
virtual void | setPlainFont () |
void | setPosition (const Coord &position) |
virtual void | setScaleToSize (bool state) |
virtual void | setSize (const Size &size) |
virtual void | setSizeForOutAlign (const Size &size) |
void | setText (const std::string &text) |
void | setTextureName (const std::string &name) |
virtual void | setUseLODOptimisation (bool state, BoundingBox bb=BoundingBox()) |
void | setUseMinMaxSize (bool state) |
virtual void | setWithXML (const std::string &inString, unsigned int ¤tPosition) |
virtual void | translate (const Coord &mouvement) |
Public Member Functions inherited from tlp::GlSimpleEntity | |
GlSimpleEntity () | |
virtual | ~GlSimpleEntity () |
int | getStencil () |
bool | isVisible () const |
virtual void | setStencil (int stencil) |
virtual void | setVisible (bool visible) |
Additional Inherited Members | |
Protected Attributes inherited from tlp::GlSimpleEntity | |
BoundingBox | boundingBox |
std::vector< GlComposite * > | parents |
int | stencil |
bool | visible |
Create a label into Tulip 3D engine.
The shortes way to create a label is :
tlp::GlLabel::GlLabel | ( | ) |
Constructor.
tlp::GlLabel::GlLabel | ( | Coord | centerPosition, |
Size | size, | ||
Color | fontColor, | ||
bool | leftAlign = false |
||
) |
Contructor.
centerPosition | position of the label |
size | size of the label |
fontColor | color of the label |
leftAlign | true if you want a left align label |
tlp::GlLabel::~GlLabel | ( | ) |
Destructor.
|
virtual |
Draw the Label.
Implements tlp::GlSimpleEntity.
void tlp::GlLabel::drawWithStencil | ( | float | lod, |
Camera * | camera = NULL |
||
) |
Set the stencil and draw the Label, this function is usefull when we directly call draw without tulip engine.
|
inlinevirtual |
|
virtual |
Return the bounding box of the label.
Reimplemented from tlp::GlSimpleEntity.
|
inlinevirtual |
|
inline |
float tlp::GlLabel::getHeightAfterScale | ( | ) |
Return the height of the label after scaling in size box.
|
inlinevirtual |
|
inline |
Get max screen size (in pixel) of the label : this size is used in not scaled mode.
|
inline |
Get min screen size (in pixel) of the label : this size is used in not scaled mode.
|
inline |
|
inline |
Coord tlp::GlLabel::getPosition | ( | ) |
Return the position of the label.
|
virtual |
return the size of the text
|
virtual |
return the size for alignment outside (left/right/top/bottom)
const std::string& tlp::GlLabel::getText | ( | ) | const |
getText gets the text of this label.
|
virtual |
Return the bounding box of the text of the label after transformations.
|
inline |
|
inlinevirtual |
|
virtual |
Function to export data in outString (in XML format)
Implements tlp::GlSimpleEntity.
|
inline |
|
inline |
|
virtual |
Rotate Label.
|
inlinevirtual |
Set the alignment of the label : LabelPosition::Center, LabelPosition::Top, LabelPosition::Bottom, LabelPosition::Left, LabelPosition::Right This function is usefull when you have an entity : you spesify the size of the position of this entity and you tell that you want a label outside this entity.
|
inline |
|
virtual |
Switch to bold font.
|
inlinevirtual |
|
virtual |
Change font name.
|
virtual |
Change font name, size and color of the text.
|
inline |
|
inlinevirtual |
|
inline |
Set max screen size (in pixel) of the label : this size is used in not scaled mode.
|
inline |
Set min screen size (in pixel) of the label : this size is used in not scaled mode.
|
inlinevirtual |
|
inline |
|
inline |
|
virtual |
Switch to plain font.
void tlp::GlLabel::setPosition | ( | const Coord & | position | ) |
Set the position used to render the label.
|
inlinevirtual |
|
virtual |
Set the size of the label.
|
virtual |
Set the size for alignment outside (left/right/top/bottom)
You can have a specific size when you want a label outside
: this size is reinit when you call setSize
void tlp::GlLabel::setText | ( | const std::string & | text | ) |
Set the text of the label.
|
inline |
|
inlinevirtual |
|
inline |
|
virtual |
Function to set data with inString (in XML format)
Implements tlp::GlSimpleEntity.
|
virtual |
Translate entity.