MOS
|
#include <text.hpp>
Public Member Functions | |
Text (const std::string &txt, Font font, const glm::mat4 &transform=glm::mat4(1.0f), float spacing=0.0f, float opacity=1.0f, float roughness=1.0f, float metallic=0.0f, const glm::vec3 &emission=glm::vec3(0.0f)) | |
auto | text (const std::string &text) -> void |
Set text. More... | |
auto | text () const -> std::string |
Get text. More... | |
auto | width () const -> float |
Approximate width. More... | |
auto | height () const -> float |
Approximate height. More... | |
auto | position (const glm::vec2 &position) -> void |
Set position. | |
auto | position (const glm::vec3 &position) -> void |
Set position. | |
auto | position () const -> glm::vec2 |
Get position. More... | |
auto | scale (float scale) -> void |
Set scale. More... | |
auto | transform (const glm::mat4 &transform) -> void |
Set transform. | |
auto | transform () const -> glm::mat4 |
Get transform. | |
auto | model () const -> Model |
Get model. More... | |
auto | opacity (float opacity) -> void |
Set opacity. More... | |
auto | emission (const glm::vec3 &emission) -> void |
Set if the text is emissive. More... | |
auto | font () const -> Font |
Get the font. More... | |
auto | operator= (const std::string &input) -> Text & |
auto | operator+= (const std::string &input) -> Text & |
Public Attributes | |
float | spacing |
Text for rendering.
auto mos::gfx::Text::emission | ( | const glm::vec3 & | emission | ) | -> void |
Set if the text is emissive.
auto mos::gfx::Text::font | ( | ) | const -> Font |
Get the font.
auto mos::gfx::Text::height | ( | ) | const -> float |
Approximate height.
auto mos::gfx::Text::model | ( | ) | const -> Model |
Get model.
auto mos::gfx::Text::opacity | ( | float | opacity | ) | -> void |
Set opacity.
auto mos::gfx::Text::position | ( | ) | const -> glm::vec2 |
Get position.
auto mos::gfx::Text::scale | ( | float | scale | ) | -> void |
Set scale.
auto mos::gfx::Text::text | ( | const std::string & | text | ) | -> void |
Set text.
auto mos::gfx::Text::text | ( | ) | const -> std::string |
Get text.
auto mos::gfx::Text::width | ( | ) | const -> float |
Approximate width.