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:
24
src/ViewCube.h
Normal file
24
src/ViewCube.h
Normal 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
|
||||
Reference in New Issue
Block a user