|
PGR Copakond OpenGL Engine - Bowling
|
Dynamically generates 2D geometry to render text using a bitmap font atlas. More...
#include <textLabel.h>
Public Member Functions | |
| TextLabel (const std::string &fontImagePath) | |
| TextLabel (const std::string &fontImagePath, std::shared_ptr< Material > material) | |
| ~TextLabel () override | |
| void | setText (const std::string &text) |
| Updates the displayed text string and regenerates mesh geometry. | |
| void | setColor (const glm::vec3 &color) const |
| void | init (GLuint shader) override |
| Initializes buffers with GL_DYNAMIC_DRAW flag for frequent text updates. | |
| void | draw (float deltaTime) override |
| Public Member Functions inherited from copakond::Mesh | |
| Mesh () | |
| Mesh (const glm::vec3 &position) | |
| Mesh (const glm::vec3 &position, const glm::vec3 &rotation) | |
| Mesh (const glm::vec3 &position, const glm::vec3 &rotation, const glm::vec3 &scale) | |
| virtual | ~Mesh () |
| void | setVertices (const std::vector< float > &vertices) |
| void | setMaterial (const std::shared_ptr< Material > &material) |
| Applies a material to the entire mesh and all its submeshes. | |
| const std::vector< SubMesh > & | getSubMeshes () const |
| std::shared_ptr< Material > | getMaterial () |
| GLuint | getVao () const |
| GLsizei | getNumVertices () const |
| int | getId () const |
| void | setVertexWave (bool isVertexWave) |
| bool | isVertexWave () const |
| void | hide () |
| void | show () |
| void | setVisible (bool visible) |
| bool | isVisible () const |
| Public Member Functions inherited from copakond::Geometry | |
| Geometry () | |
| Geometry (const glm::vec3 &position) | |
| Geometry (const glm::vec3 &position, const glm::vec3 &rotation) | |
| Geometry (const glm::vec3 &position, const glm::vec3 &rotation, const glm::vec3 &scale) | |
| virtual | ~Geometry () |
| virtual void | setPosition (const glm::vec3 &position) |
| virtual void | setRotation (const glm::vec3 &rotation) |
| virtual void | setScale (const glm::vec3 &scale) |
| virtual void | setRotationDegrees (const glm::vec3 &rotationDegrees) |
| glm::mat4 | getRotationXMatrix () const |
| glm::mat4 | getRotationYMatrix () const |
| glm::mat4 | getRotationZMatrix () const |
| glm::mat4 | getPositionMatrix () const |
| glm::mat4 | getRotationMatrix () const |
| glm::mat4 | getScaleMatrix () const |
| glm::mat4 | getModelMatrix () const |
| Calculates local transformation matrix. | |
| glm::mat4 | getWorldPositionMatrix () const |
| glm::mat4 | getWorldRotationMatrix () const |
| glm::mat4 | getWorldScaleMatrix () const |
| glm::mat4 | getWorldModelMatrix () const |
| Calculates global transformation matrix by multiplying all ancestor matrices. | |
| glm::vec3 | getPosition () const |
| glm::vec3 | getRotation () const |
| glm::vec3 | getScale () const |
| glm::vec3 | getRotationDegrees () const |
| glm::vec3 | getWorldPosition () const |
| glm::vec3 | getWorldRotation () const |
| glm::vec3 | getWorldScale () const |
| glm::vec3 & | position () |
| glm::vec3 & | rotation () |
| glm::vec3 & | scale () |
| glm::vec3 | worldPosition () const |
| glm::vec3 | worldRotation () const |
| glm::vec3 | worldScale () const |
| bool | setParent (Geometry *newParent) |
| Attaches this object to a new parent in the scene graph. | |
| Geometry * | getParent () const |
| std::vector< Geometry * > | getChildren () const |
Additional Inherited Members | |
| Protected Member Functions inherited from copakond::Mesh | |
| void | _SetId () |
| Protected Attributes inherited from copakond::Mesh | |
| int | id |
| int | _isVertexWave = false |
| bool | _visible = true |
| GLuint | _shaderProgram = 0 |
| GLuint | _vboVertices = 0 |
| GLuint | _vboNormals = 0 |
| GLuint | _vao = 0 |
| GLsizei | _numVertices = 0 |
| std::vector< float > | _vertices = std::vector<float>() |
| std::shared_ptr< Material > | _material = std::make_shared<Material>() |
| std::vector< SubMesh > | _subMeshes |
| Protected Attributes inherited from copakond::Geometry | |
| Geometry * | parent = nullptr |
| std::vector< Geometry * > | children |
| glm::vec3 | _position |
| glm::vec3 | _rotation |
| glm::vec3 | _scale |
| Static Protected Attributes inherited from copakond::Mesh | |
| static int | globalMeshCounter = 0 |
Dynamically generates 2D geometry to render text using a bitmap font atlas.
| copakond::TextLabel::TextLabel | ( | const std::string & | fontImagePath | ) |
| copakond::TextLabel::TextLabel | ( | const std::string & | fontImagePath, |
| std::shared_ptr< Material > | material ) |
|
override |
|
overridevirtual |
Reimplemented from copakond::Mesh.
|
overridevirtual |
Initializes buffers with GL_DYNAMIC_DRAW flag for frequent text updates.
Reimplemented from copakond::Mesh.
| void copakond::TextLabel::setColor | ( | const glm::vec3 & | color | ) | const |
| void copakond::TextLabel::setText | ( | const std::string & | text | ) |
Updates the displayed text string and regenerates mesh geometry.
| text | The new string to render. |