#ifndef EDITSEGMENT_H #define EDITSEGMENT_H #include #include #include #include #include #include #include #include #include #include #include #include #include struct Penn { float radius; int paintutensil; int painttype; bool backface; bool invisible; }; class EditSegment : public QObject, public MeshEditInterface { Q_OBJECT Q_INTERFACES(MeshEditInterface) QList actionList; private: MeshCutting * meshCut; bool show_trackball; bool first; bool dragging; bool selectForeground; QPoint current_point; QPoint previous_point; Qt::MouseButton mouse_button_pressed; bool pressed; Penn pen; QDockWidget *meshcut_dock; MeshCutDialog * meshCutDialog; GLArea * glarea; vector currentSelection; GLfloat *pixels; double mvmatrix[16]; //modelview double projmatrix[16]; //projection GLint viewport[4]; //viewport inline void updateMatrixes() { glGetIntegerv(GL_VIEWPORT, viewport); glGetDoublev (GL_MODELVIEW_MATRIX, mvmatrix); glGetDoublev (GL_PROJECTION_MATRIX, projmatrix); } void DrawXORCircle(MeshModel &m,GLArea * gla, bool doubleDraw); // draws the circle which represents the pen public: EditSegment(); ~EditSegment(); const QString Info(QAction *); const PluginInfo &Info(); void StartEdit(QAction * /*mode*/, MeshModel & /*m*/, GLArea * /*parent*/); void EndEdit (QAction * /*mode*/, MeshModel & /*m*/, GLArea * /*parent*/); void Decorate (QAction * /*mode*/, MeshModel & /*m*/, GLArea * /*parent*/); void mousePressEvent (QAction *, QMouseEvent *event, MeshModel & /*m*/, GLArea * ); void mouseMoveEvent (QAction *, QMouseEvent *event, MeshModel & /*m*/, GLArea * ); void mouseReleaseEvent (QAction *, QMouseEvent *event, MeshModel & /*m*/, GLArea * ); //void wheelEvent (QAction *QWheelEvent*e, MeshModel &/*m*/, GLArea * ); QList actions() const ; public slots: void MeshCutSlot(); void SelectForegroundSlot(bool); void ColorizeGaussianSlot(); void ColorizeMeanSlot(); void ResetSlot(); }; #endif