7 #include <QOpenGLWidget> 8 #include <QOpenGLFunctions_4_0_Core> 9 #include <QOpenGLDebugLogger> 11 #include <QElapsedTimer> 12 #include <QOpenGLShaderProgram> 13 #include <QOpenGLBuffer> 14 #include <QOpenGLVertexArrayObject> 16 #include <QOpenGLTexture> 21 class GLWidget :
public QOpenGLWidget, QOpenGLFunctions_4_0_Core
33 GLWidget(QWidget* parent = Q_NULLPTR,
int updateRate = 60,
bool sampleShading =
true,
int anisotropy = 1);
41 virtual void setTrackData(
const QVector<Track>&& tracks);
59 thickness = p_thickness;
75 stripDepth = p_stripDepth;
83 depthCueing = p_depthCueing;
102 virtual void paintGL() Q_DECL_OVERRIDE;
119 virtual void resizeGL(
int w,
int h) Q_DECL_OVERRIDE;
153 void wheelEvent(QWheelEvent* event) Q_DECL_OVERRIDE;
164 QOpenGLShaderProgram* createShaderProgram(
const QString& pathVS,
const QString& pathFS,
const QString& pathGS =
"");
167 QOpenGLDebugLogger* logger = Q_NULLPTR;
170 int frameCounter = 0;
180 QElapsedTimer frameTimer;
183 const bool sampleShading;
186 const int anisotropy;
189 bool wireframe =
false;
205 bool filterTracks =
false;
208 QVector<Track> tracks;
211 QOpenGLTexture* textureStroke = Q_NULLPTR;
214 QOpenGLTexture* textureStripMask = Q_NULLPTR;
217 QOpenGLShaderProgram* program = Q_NULLPTR;
223 QOpenGLBuffer uvBuffer;
226 QOpenGLBuffer dirBuffer;
229 QOpenGLVertexArrayObject vao;
235 QMatrix4x4 matViewModel;
253 float interpolateSliderValue(
int value,
float min,
float max);
262 QVector3D normalizedPoint(QVector3D point, QVector3D min, QVector3D range,
float scale);
Class for orbital cameras.
Definition: camera.h:13