An object that may be added to a Scene to display the XYZ axes.
More...
#include <drawableaxes.h>
|
| QSharedPointer< QOpenGLVertexArrayObject > | mVAO |
| |
| QSharedPointer< QOpenGLBuffer > | mPos |
| |
| QSharedPointer< QOpenGLBuffer > | mColor |
| |
| QSharedPointer< QOpenGLShaderProgram > | mProgram |
| |
An object that may be added to a Scene to display the XYZ axes.
DrawableAxes always draws itself at (0, 0, 0). It does not disable depth testing, so the axes could be completely covered up by a large object.
◆ DrawableAxes()
| DrawableAxes::DrawableAxes |
( |
| ) |
|
◆ draw()
| void DrawableAxes::draw |
( |
QMatrix4x4 |
projection, |
|
|
QMatrix4x4 |
transformation |
|
) |
| |
|
overridevirtual |
Performs OpenGL calls to draw the object, assuming a context is bound.
- Parameters
-
| projection | The projection matrix used for the meshes. |
| transformation | The transformation matrix used for the meshes. The purpose of separating this from the projection is to allow a user to extract the translation and rotation components. |
The gl_Position of a vertex V is given by (projection * transformation * V).
Implements AbstractDrawableGLObject.
◆ initializeGL()
| void DrawableAxes::initializeGL |
( |
| ) |
|
|
overridevirtual |
Called when this object is to be used with a new OpenGL context. Must be called before the first draw() call in the context.
Implements AbstractDrawableGLObject.
◆ mColor
| QSharedPointer<QOpenGLBuffer> DrawableAxes::mColor |
|
protected |
◆ mPos
| QSharedPointer<QOpenGLBuffer> DrawableAxes::mPos |
|
protected |
◆ mProgram
| QSharedPointer<QOpenGLShaderProgram> DrawableAxes::mProgram |
|
protected |
◆ mVAO
| QSharedPointer<QOpenGLVertexArrayObject> DrawableAxes::mVAO |
|
protected |
The documentation for this class was generated from the following files: