CGAL 4.12.2 - Three
|
#include <CGAL/Three/TextRenderer.h>
QObject.
The TextRender projects each TextItem from the world coordinates to the Screen coordinates and draws it.
Signals | |
void | sendMessage (QString message, int ms_delay=2000) |
Emit this to print message on the viewer for ms_delay ms. | |
Public Member Functions | |
void | draw (CGAL::Three::Viewer_interface *viewer) |
Draws all the TextItem s. | |
void | addText (TextItem *) |
Adds a single TextItem to TextRenderer::local_textItems. More... | |
void | addText (float p_x, float p_y, float p_z, QString p_text, bool p_3D=true, QFont font=QFont(), QColor p_color=Qt::black) |
Creates a new TextItem in TextRenderer::local_textItems. More... | |
void | addTextList (TextListItem *) |
Adds a TextListItem to TextRenderer::textItems. | |
void | removeText (TextItem *textItem) |
Removes a textItem from TextRenderer::local_textItems. More... | |
void | removeTextList (TextListItem *) |
Removes a TextItemList from TextRenderer::textItems //! More... | |
QList< TextItem * > | getLocalTextItems () |
The local TextListItem. | |
QList< TextListItem * > | items () const |
The global list of TextListItem s. | |
void | setScene (CGAL::Three::Scene_interface *p_scene) |
Gives the renderer a Scene. | |
int | getMax_textItems () const |
The maximum TextItem s that can be displayed at once. More... | |
void | setMax (int max) |
Sets the maximum TextItem s that can be displayed at once. More... | |
Protected Attributes | |
QList< TextListItem * > | textItems |
list of TextListItem s More... | |
QList< TextItem * > | local_textItems |
List of TextItem s. More... | |
void TextRenderer::addText | ( | TextItem * | ) |
Adds a single TextItem to TextRenderer::local_textItems.
void TextRenderer::addText | ( | float | p_x, |
float | p_y, | ||
float | p_z, | ||
QString | p_text, | ||
bool | p_3D = true , |
||
QFont | font = QFont() , |
||
QColor | p_color = Qt::black |
||
) |
Creates a new TextItem in TextRenderer::local_textItems.
This is a version of addText(TextItem*) that creates the TextItem on the fly.
int TextRenderer::getMax_textItems | ( | ) | const |
void TextRenderer::removeText | ( | TextItem * | textItem | ) |
Removes a textItem
from TextRenderer::local_textItems.
void TextRenderer::removeTextList | ( | TextListItem * | ) |
Removes a TextItemList from TextRenderer::textItems //!
void TextRenderer::setMax | ( | int | max | ) |
Sets the maximum TextItem
s that can be displayed at once.
|
protected |
List of TextItem
s.
Usually fed by the viewer, it holds the text informations from the viewer that are displayed directly on the screen, like the fps, the distances, etc.
|
protected |
list of TextListItem
s
It holds lists of correlated TextItem
s that are associated to a CGAL::Three::Scene_item, like primitiveIds.