The LightRayRenderer packs LightRays and paints them.
More...
#include <lightrayrenderer.h>
The LightRayRenderer packs LightRays and paints them.
LightRayRenderer::LightRayRenderer |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
LightRayRenderer::~LightRayRenderer |
( |
| ) |
|
|
virtual |
void LightRayRenderer::addLightRay |
( |
const LightRay & |
lightRay | ) |
|
Adds a new LightRay that will be rendered. Dynamic LightRays are added without checking whether they exist or not. Static LightRays will be only added if the LightRay is not already drawn by LightRayRenderer.
- Parameters
-
void LightRayRenderer::calculateVertexDataFor |
( |
const LightRayData & |
rayData, |
|
|
QVector< float > & |
vertices, |
|
|
QVector< unsigned int > & |
indices |
|
) |
| |
|
protected |
Calculates vertex data out of start and end position of a ray.
- Parameters
-
rayData | The ray that should be drawn and requires vertex data |
vertices | A vector the vertex data will be appended |
indices | A vector the index data will be appended |
void LightRayRenderer::paint |
( |
QOpenGLFunctions & |
gl, |
|
|
const QMatrix4x4 & |
viewProjection, |
|
|
QOpenGLShaderProgram & |
shaderProgram |
|
) |
| |
|
virtual |
Paints all LightRays.
- Parameters
-
gl | QOPenGLFunctions which are used for gl-calls |
viewProjection | The viewprojection matrix for drawing the rays. |
shaderProgram | The shader program that will be used to draw rays. |
void LightRayRenderer::resetDynamicRays |
( |
| ) |
|
Removes all dynamic rays. It is suggested to do so every frame.
void LightRayRenderer::updateDynamicVBO |
( |
| ) |
|
|
protected |
void LightRayRenderer::updateRayVBO |
( |
QOpenGLBuffer *& |
vertexBuffer, |
|
|
QOpenGLBuffer *& |
indexBuffer, |
|
|
const QSet< LightRayData > & |
data |
|
) |
| |
|
protected |
void LightRayRenderer::updateStaticVBO |
( |
| ) |
|
|
protected |
QOpenGLBuffer* LightRayRenderer::m_dynamicIndexBuffer |
|
protected |
QOpenGLBuffer* LightRayRenderer::m_dynamicVertexBuffer |
|
protected |
bool LightRayRenderer::m_isStaticVBOUpdateRequired |
|
protected |
QOpenGLBuffer* LightRayRenderer::m_staticIndexBuffer |
|
protected |
QOpenGLBuffer* LightRayRenderer::m_staticVertexBuffer |
|
protected |
The documentation for this class was generated from the following files: