Renders an OpenGL object (vertex-array) in a color and using a transformation/translation matrix.
More...
#include <OpenGLRenderObject.h>
|
| | OpenGLRenderObject (QObject *parent=nullptr) |
| | Qt constructor.
|
| |
| void | render (const std::function< void()> &cb) |
| | Render the object using a callback lambda function.
|
| |
| void | setVertexArray (QOpenGLVertexArrayObject *) |
| | Sets the assigned vertex array.
|
| |
| QOpenGLVertexArrayObject * | vertexArray () |
| | Gets the assigned vertex array.
|
| |
| QMatrix4x4 & | matrix () |
| | Gets the reference to the matrix to be modified.
|
| |
| QColor & | color () |
| | Gets the reference to the color to be modified.
|
| |
| virtual bool | isEnabled () |
| | Gets the reference to the enable flag. Can be overridden to implement otherwise.
|
| |
| void | setEnabled (bool flag) |
| | Sets the enable flag for this instance.
|
| |
| Q_SIGNAL void | rendering () |
| | Signal emitted just before the render() method is called.
|
| |
|
| QOpenGLVertexArrayObject * | _vertexArray |
| | Holds the vertex array type derived object.
|
| |
| QMatrix4x4 | _matrix |
| | Holds the matrix to transform and/or translate and defaults to a unit or identity matrix.
|
| |
| QColor | _color |
| | Holds the color to render when the object has no color of itself.
|
| |
| bool | _enabled |
| | Holds the flag weather it should be rendered or not.
|
| |
Renders an OpenGL object (vertex-array) in a color and using a transformation/translation matrix.
◆ OpenGLRenderObject()
| sf::OpenGLRenderObject::OpenGLRenderObject |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Qt constructor.
- Parameters
-
◆ color()
| QColor & sf::OpenGLRenderObject::color |
( |
| ) |
|
Gets the reference to the color to be modified.
◆ isEnabled()
| virtual bool sf::OpenGLRenderObject::isEnabled |
( |
| ) |
|
|
virtual |
Gets the reference to the enable flag. Can be overridden to implement otherwise.
◆ matrix()
| QMatrix4x4 & sf::OpenGLRenderObject::matrix |
( |
| ) |
|
Gets the reference to the matrix to be modified.
◆ render()
| void sf::OpenGLRenderObject::render |
( |
const std::function< void()> & |
cb | ) |
|
Render the object using a callback lambda function.
- Parameters
-
◆ rendering()
| Q_SIGNAL void sf::OpenGLRenderObject::rendering |
( |
| ) |
|
Signal emitted just before the render() method is called.
◆ setEnabled()
| void sf::OpenGLRenderObject::setEnabled |
( |
bool |
flag | ) |
|
Sets the enable flag for this instance.
◆ setVertexArray()
| void sf::OpenGLRenderObject::setVertexArray |
( |
QOpenGLVertexArrayObject * |
| ) |
|
Sets the assigned vertex array.
◆ vertexArray()
| QOpenGLVertexArrayObject * sf::OpenGLRenderObject::vertexArray |
( |
| ) |
|
Gets the assigned vertex array.
◆ _color
| QColor sf::OpenGLRenderObject::_color |
|
protected |
Holds the color to render when the object has no color of itself.
◆ _enabled
| bool sf::OpenGLRenderObject::_enabled |
|
protected |
Holds the flag weather it should be rendered or not.
◆ _matrix
| QMatrix4x4 sf::OpenGLRenderObject::_matrix |
|
protected |
Holds the matrix to transform and/or translate and defaults to a unit or identity matrix.
◆ _vertexArray
| QOpenGLVertexArrayObject* sf::OpenGLRenderObject::_vertexArray |
|
protected |
Holds the vertex array type derived object.
The documentation for this class was generated from the following file: