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:
2026-02-09 16:04:40 -07:00
parent be35ae3196
commit 732a7bd428
5 changed files with 177 additions and 131 deletions

24
src/ViewCube.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef VIEWCUBE_H
#define VIEWCUBE_H
#include <QOpenGLFunctions>
#include <QMatrix4x4>
#include <QtOpenGL/qgl.h> // For GLuint
class ViewCube : protected QOpenGLFunctions
{
public:
ViewCube();
void initializeGL();
void paintGL(const QMatrix4x4& viewMatrix, int width, int height);
private:
void createFaceTextures();
void drawViewCube();
void drawAxes();
GLuint faceTextures[6];
};
#endif // VIEWCUBE_H