gz/rendering/base/BaseText.hh
Represents a billboard text geometry that is always facing the camera.
Definition: gz/rendering/Text.hh:62
STL class.
float charHeight
Character height in meters.
Definition: gz/rendering/base/BaseText.hh:113
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
Definition: gz/rendering/base/BaseText.hh:289
std::string text
Text being displayed.
Definition: gz/rendering/base/BaseText.hh:107
BaseText()
Constructor.
Definition: gz/rendering/base/BaseText.hh:140
bool onTop
True for text to be displayed on top of other objects in the scene.
Definition: gz/rendering/base/BaseText.hh:130
float spaceWidth
Width of space between letters.
Definition: gz/rendering/base/BaseText.hh:116
TextHorizontalAlign horizontalAlign
Horizontal alignment.
Definition: gz/rendering/base/BaseText.hh:119
virtual bool ShowOnTop() const override
Get whether the is displayed above other objects.
Definition: gz/rendering/base/BaseText.hh:266
virtual TextVerticalAlign VerticalAlignment() const override
Get the vertical alignment of the text.
Definition: gz/rendering/base/BaseText.hh:234
virtual void SetCharHeight(const float _height) override
Set the height of the character in meters.
Definition: gz/rendering/base/BaseText.hh:204
TextVerticalAlign
Text vertical alignment.
Definition: gz/rendering/Text.hh:49
float baseline
Baseline height in meters.
Definition: gz/rendering/base/BaseText.hh:126
bool textDirty
Flag to indicate text properties have changed.
Definition: gz/rendering/base/BaseText.hh:133
std::string fontName
Font name, such as "Liberation Sans".
Definition: gz/rendering/base/BaseText.hh:104
virtual TextHorizontalAlign HorizontalAlignment() const override
Get the horizontal alignment of the text.
Definition: gz/rendering/base/BaseText.hh:227
virtual void SetTextString(const std::string &_text) override
Set the text to display.
Definition: gz/rendering/base/BaseText.hh:174
virtual ~BaseText()
Destructor.
Definition: gz/rendering/base/BaseText.hh:146
void SetFontName(const std::string &_font) override
Set the font.
Definition: gz/rendering/base/BaseText.hh:159
Base implementation of a text geometry.
Definition: gz/rendering/base/BaseText.hh:32
std::string FontName() const override
Get the font name.
Definition: gz/rendering/base/BaseText.hh:152
virtual void SetBaseline(const float _baseline) override
Set the baseline height of the text.
Definition: gz/rendering/base/BaseText.hh:258
virtual void SetSpaceWidth(const float _width) override
Set the width of spaces between words.
Definition: gz/rendering/base/BaseText.hh:219
virtual gz::math::AxisAlignedBox AABB() const override
Get the axis aligned bounding box of the text.
Definition: gz/rendering/base/BaseText.hh:281
TextVerticalAlign verticalAlign
Vertical alignment.
Definition: gz/rendering/base/BaseText.hh:123
virtual float Baseline() const override
Get the baseline height in meters.
Definition: gz/rendering/base/BaseText.hh:251
virtual void SetTextAlignment(const TextHorizontalAlign &_hAlign, const TextVerticalAlign &_vAlign) override
Set the alignment of the text.
Definition: gz/rendering/base/BaseText.hh:241
virtual float CharHeight() const override
Get the height of the characters in meters return Height of the characters.
Definition: gz/rendering/base/BaseText.hh:197
virtual void SetColor(const gz::math::Color &_color) override
Set the text color.
Definition: gz/rendering/base/BaseText.hh:189
virtual float SpaceWidth() const override
Get the width of spaces between words.
Definition: gz/rendering/base/BaseText.hh:212
TextHorizontalAlign
Text Horizontal alignment.
Definition: gz/rendering/Text.hh:37
virtual gz::math::Color Color() const override
Get the text color.
Definition: gz/rendering/base/BaseText.hh:182
virtual void Destroy() override
Destroy any resources associated with this object. Invoking any other functions after destroying an o...
Definition: gz/rendering/base/BaseText.hh:296
void SetShowOnTop(const bool _onTop) override
True = text always is displayed ontop.
Definition: gz/rendering/base/BaseText.hh:273
gz::math::Color color
Text color.
Definition: gz/rendering/base/BaseText.hh:110
virtual std::string TextString() const override
Get the displayed text.
Definition: gz/rendering/base/BaseText.hh:167