feat: Implement floating feature browser in viewport with transparent background

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-02-09 17:33:01 -07:00
parent f8386938cb
commit c6f82a04e8
6 changed files with 92 additions and 40 deletions

View File

@@ -10,6 +10,8 @@
class ViewCube;
class SketchGrid;
class Document;
class Feature;
class ViewportWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
@@ -27,6 +29,7 @@ public:
~ViewportWidget();
void startSketch(SketchPlane plane);
void setDocument(Document* document);
protected:
void initializeGL() override;
@@ -40,10 +43,12 @@ protected:
private:
QVector3D project(const QVector3D& worldCoord, const QMatrix4x4& modelView, const QMatrix4x4& projection, const QRect& viewport);
void drawAxisLabels(QPainter& painter, const QMatrix4x4& modelView, const QMatrix4x4& projection);
void drawFeatureBrowser(QPainter& painter);
QMatrix4x4 projection;
ViewCube* m_viewCube;
SketchGrid* m_sketchGrid = nullptr;
Document* m_document = nullptr;
SketchPlane m_currentPlane = SketchPlane::NONE;
float xRot = 0;