#pragma once #include #include #include #include #include #include "FileInterface.h" struct DrawInformation { unsigned int offset; unsigned int size; unsigned int textureIndex; QMatrix4x4 modelMatrix; }; class GeometryEngine : public QObject, protected QOpenGLFunctions { Q_OBJECT public: GeometryEngine(QObject *parent = Q_NULLPTR); virtual ~GeometryEngine(); // attributes private: QOpenGLBuffer m_arrayBuf; QOpenGLBuffer m_indexBuf; QVector* m_materials = Q_NULLPTR; Material* m_defaultMaterial; BoundingBox m_boundings; QVector m_drawList; // functions private: void clearData(); public: void drawGeometry(QOpenGLShaderProgram *program, bool wireframe); // slots public slots: void loadFile(QString filePath); // signals signals: void requestResetView(); void sendMessage(QString message, int severity); void requestUpdate(); void sendFileInfo(QString name, QVector* materials, int vertices, int triangle); };