refactor: Extract view cube rendering to dedicated class
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -6,12 +6,15 @@
|
||||
#include <QMatrix4x4>
|
||||
#include <QPoint>
|
||||
|
||||
class ViewCube;
|
||||
|
||||
class ViewportWidget : public QOpenGLWidget, protected QOpenGLFunctions
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ViewportWidget(QWidget *parent = nullptr);
|
||||
~ViewportWidget();
|
||||
|
||||
protected:
|
||||
void initializeGL() override;
|
||||
@@ -24,12 +27,9 @@ protected:
|
||||
|
||||
private:
|
||||
void drawCube();
|
||||
void drawViewCube();
|
||||
void drawAxes();
|
||||
void createFaceTextures();
|
||||
|
||||
QMatrix4x4 projection;
|
||||
GLuint faceTextures[6];
|
||||
ViewCube* m_viewCube;
|
||||
|
||||
float xRot = 0;
|
||||
float yRot = 0;
|
||||
|
||||
Reference in New Issue
Block a user