Represents a text primitive for rendering in 3D space.
More...
#include <text.hpp>
|
| Text (void) |
| Default constructor - initializes empty text at origin with no rotation and unit scale.
|
|
| Text (const std::string &content) |
| Constructor with text content.
|
|
| Text (const std::string &content, const Point &position) |
| Constructor with text content and 3D position.
|
|
| Text (const std::string &content, const Point &position, const Point &rotation, float scale) |
| Constructor with text content, position, rotation, and scale for full 3D control.
|
|
| ~Text (void) override=default |
| Destroy the Text object.
|
|
const std::string & | getContent (void) const |
| Gets the text content.
|
|
void | setContent (const std::string &content) |
| Sets the text content.
|
|
const Point & | getPosition (void) const |
| Gets the text position.
|
|
void | setPosition (const Point &position) |
| Sets the text position.
|
|
const Point & | getRotation (void) const |
| Gets the text rotation.
|
|
void | setRotation (const Point &rotation) |
| Sets the text rotation.
|
|
float | getScale (void) const |
| Gets the text scale.
|
|
void | setScale (float scale) |
| Sets the text scale.
|
|
| Primitive (void) |
| Constructs a Primitive object.
|
|
virtual | ~Primitive (void)=default |
| Destroy the Primitive object.
|
|
Represents a text primitive for rendering in 3D space.
The Text class is a derived class of Primitive that represents text content at a specific 3D position with optional rotation and scaling. This allows components like Labels and Buttons to generate text primitives for 3D rendering.
◆ Text() [1/3]
Text::Text |
( |
const std::string & |
content | ) |
|
|
inline |
Constructor with text content.
- Parameters
-
content | The text content to display |
◆ Text() [2/3]
Text::Text |
( |
const std::string & |
content, |
|
|
const Point & |
position |
|
) |
| |
|
inline |
Constructor with text content and 3D position.
- Parameters
-
content | The text content to display |
position | The 3D position where the text should be rendered |
◆ Text() [3/3]
Text::Text |
( |
const std::string & |
content, |
|
|
const Point & |
position, |
|
|
const Point & |
rotation, |
|
|
float |
scale |
|
) |
| |
|
inline |
Constructor with text content, position, rotation, and scale for full 3D control.
- Parameters
-
content | The text content to display |
position | The 3D position where the text should be rendered |
rotation | The rotation angles (x, y, z) in radians |
scale | The scale factor for text size |
◆ getContent()
const std::string & Text::getContent |
( |
void |
| ) |
const |
|
inline |
Gets the text content.
- Returns
- const std::string& Reference to the text content
◆ getPosition()
const Point & Text::getPosition |
( |
void |
| ) |
const |
|
inline |
Gets the text position.
- Returns
- const Point& Reference to the text position
◆ getRotation()
const Point & Text::getRotation |
( |
void |
| ) |
const |
|
inline |
Gets the text rotation.
- Returns
- const Point& Reference to the rotation angles (x, y, z) in radians
◆ getScale()
float Text::getScale |
( |
void |
| ) |
const |
|
inline |
Gets the text scale.
- Returns
- float The scale factor
◆ setContent()
void Text::setContent |
( |
const std::string & |
content | ) |
|
|
inline |
Sets the text content.
- Parameters
-
content | The new text content |
◆ setPosition()
void Text::setPosition |
( |
const Point & |
position | ) |
|
|
inline |
Sets the text position.
- Parameters
-
position | The new 3D position for the text |
◆ setRotation()
void Text::setRotation |
( |
const Point & |
rotation | ) |
|
|
inline |
Sets the text rotation.
- Parameters
-
rotation | The new rotation angles (x, y, z) in radians |
◆ setScale()
void Text::setScale |
( |
float |
scale | ) |
|
|
inline |
Sets the text scale.
- Parameters
-
scale | The new scale factor |
The documentation for this class was generated from the following file: