MeshEditor.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef MESHGUI_MESHEDITOR_H
00024 #define MESHGUI_MESHEDITOR_H
00025
00026 #include <QObject>
00027 #include <Mod/Mesh/Gui/ViewProvider.h>
00028
00029 class SoCoordinate3;
00030 class SoFaceSet;
00031 class SoEventCallback;
00032 class SoPickedPoint;
00033 class SoQtViewer;
00034
00035 namespace Gui { class View3DInventor; }
00036
00037 namespace MeshGui {
00038 class SoFCMeshPickNode;
00039
00043 class MeshGuiExport ViewProviderFace : public Gui::ViewProviderDocumentObject
00044 {
00045 PROPERTY_HEADER(MeshGui::ViewProviderFace);
00046
00047 public:
00048 ViewProviderFace();
00049 virtual ~ViewProviderFace();
00050
00051
00052 void attach(App::DocumentObject* obj);
00053 void setDisplayMode(const char* ModeName);
00054 const char* getDefaultDisplayMode() const;
00055 std::vector<std::string> getDisplayModes(void) const;
00056 SoPickedPoint* getPickedPoint(const SbVec2s& pos, const SoQtViewer* viewer) const;
00057
00058 ViewProviderMesh* mesh;
00059 std::vector<int> index;
00060 int current_index;
00061
00062 SoCoordinate3 * pcCoords;
00063 SoFaceSet * pcFaces;
00064 SoFCMeshPickNode* pcMeshPick;
00065 };
00066
00071 class MeshGuiExport MeshFaceAddition : public QObject
00072 {
00073 Q_OBJECT
00074
00075 public:
00076 MeshFaceAddition(Gui::View3DInventor* parent);
00077 ~MeshFaceAddition();
00078
00079 void startEditing(ViewProviderMesh*);
00080
00081 public Q_SLOTS:
00082 void finishEditing();
00083
00084 private Q_SLOTS:
00085 void addFace();
00086 void clearPoints();
00087 void flipNormal();
00088
00089 private:
00090 bool addMarkerPoint();
00091 void showMarker(SoPickedPoint*);
00092 static void addFacetCallback(void * ud, SoEventCallback * n);
00093
00094 private:
00095 ViewProviderFace* faceView;
00096 };
00097
00098 }
00099
00100
00101 #endif // MESHGUI_MESHEDITOR_H
00102