Tulip
4.6.0
Better Visualization Through Research
|
#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) |
void | init () |
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) |
Create a label into Tulip 3D engine.
The shortes way to create a label is :
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 |
Destructor.
virtual void tlp::GlLabel::draw | ( | float | , |
Camera * | camera = NULL |
||
) | [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.
virtual void tlp::GlLabel::enableDepthTest | ( | bool | state | ) | [inline, virtual] |
virtual BoundingBox tlp::GlLabel::getBoundingBox | ( | ) | [virtual] |
Return the bounding box of the label.
Reimplemented from tlp::GlSimpleEntity.
virtual Color tlp::GlLabel::getColor | ( | ) | [inline, virtual] |
int tlp::GlLabel::getFontSize | ( | ) | const [inline] |
float tlp::GlLabel::getHeightAfterScale | ( | ) |
Return the height of the label after scaling in size box.
virtual int tlp::GlLabel::getLabelDensity | ( | ) | [inline, virtual] |
int tlp::GlLabel::getMaxSize | ( | ) | [inline] |
Get max screen size (in pixel) of the label : this size is used in not scaled mode.
int tlp::GlLabel::getMinSize | ( | ) | [inline] |
Get min screen size (in pixel) of the label : this size is used in not scaled mode.
Color tlp::GlLabel::getOutlineColor | ( | ) | const [inline] |
float tlp::GlLabel::getOutlineSize | ( | ) | const [inline] |
Coord tlp::GlLabel::getPosition | ( | ) |
Return the position of the label.
virtual Size tlp::GlLabel::getSize | ( | ) | [virtual] |
return the size of the text
virtual Size tlp::GlLabel::getSizeForOutAlign | ( | ) | [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 BoundingBox tlp::GlLabel::getTextBoundingBox | ( | ) | [virtual] |
Return the bounding box of the text of the label after transformations.
std::string tlp::GlLabel::getTextureName | ( | ) | const [inline] |
virtual bool tlp::GlLabel::getUseLODOptimisation | ( | ) | [inline, virtual] |
virtual void tlp::GlLabel::getXML | ( | std::string & | outString | ) | [virtual] |
Function to export data in outString (in XML format)
Implements tlp::GlSimpleEntity.
void tlp::GlLabel::init | ( | ) |
Set default parameters of GlLabel.
This function is call by constructor, so you don't have to call it
bool tlp::GlLabel::isBillboarded | ( | ) | [inline] |
bool tlp::GlLabel::isUsingMinMaxSize | ( | ) | [inline] |
virtual void tlp::GlLabel::rotate | ( | float | xRot, |
float | yRot, | ||
float | zRot | ||
) | [virtual] |
Rotate Label.
virtual void tlp::GlLabel::setAlignment | ( | int | alignment | ) | [inline, virtual] |
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.
void tlp::GlLabel::setBillboarded | ( | bool | billboarded | ) | [inline] |
virtual void tlp::GlLabel::setBoldFont | ( | ) | [virtual] |
Switch to bold font.
virtual void tlp::GlLabel::setColor | ( | const Color & | color | ) | [inline, virtual] |
virtual void tlp::GlLabel::setFontName | ( | const std::string & | name | ) | [virtual] |
Change font name.
virtual void tlp::GlLabel::setFontNameSizeAndColor | ( | const std::string & | name, |
const int & | size, | ||
const Color & | color | ||
) | [virtual] |
Change font name, size and color of the text.
void tlp::GlLabel::setFontSize | ( | int | size | ) | [inline] |
virtual void tlp::GlLabel::setLabelsDensity | ( | int | density | ) | [inline, virtual] |
void tlp::GlLabel::setMaxSize | ( | int | size | ) | [inline] |
Set max screen size (in pixel) of the label : this size is used in not scaled mode.
void tlp::GlLabel::setMinSize | ( | int | size | ) | [inline] |
Set min screen size (in pixel) of the label : this size is used in not scaled mode.
virtual void tlp::GlLabel::setOcclusionTester | ( | OcclusionTest * | tester | ) | [inline, virtual] |
void tlp::GlLabel::setOutlineColor | ( | const Color & | color | ) | [inline] |
void tlp::GlLabel::setOutlineSize | ( | float | size | ) | [inline] |
virtual void tlp::GlLabel::setPlainFont | ( | ) | [virtual] |
Switch to plain font.
void tlp::GlLabel::setPosition | ( | const Coord & | position | ) |
Set the position used to render the label.
virtual void tlp::GlLabel::setScaleToSize | ( | bool | state | ) | [inline, virtual] |
virtual void tlp::GlLabel::setSize | ( | const Size & | size | ) | [virtual] |
Set the size of the label.
virtual void tlp::GlLabel::setSizeForOutAlign | ( | const Size & | size | ) | [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.
void tlp::GlLabel::setTextureName | ( | const std::string & | name | ) | [inline] |
virtual void tlp::GlLabel::setUseLODOptimisation | ( | bool | state, |
BoundingBox | bb = BoundingBox() |
||
) | [inline, virtual] |
void tlp::GlLabel::setUseMinMaxSize | ( | bool | state | ) | [inline] |
virtual void tlp::GlLabel::setWithXML | ( | const std::string & | inString, |
unsigned int & | currentPosition | ||
) | [virtual] |
Function to set data with inString (in XML format)
Implements tlp::GlSimpleEntity.
virtual void tlp::GlLabel::translate | ( | const Coord & | mouvement | ) | [virtual] |
Translate entity.