ViewProviderCurveNet.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
00024 #ifndef PARTGUI_VIEWPROVIDERCURVENET_H
00025 #define PARTGUI_VIEWPROVIDERCURVENET_H
00026
00027 #include "ViewProvider.h"
00028
00029
00030 class TopoDS_Shape;
00031 class TopoDS_Face;
00032 class SoSeparator;
00033 class SbVec3f;
00034 class SoTransform;
00035
00036 namespace Gui {
00037 class View3DInventorViewer;
00038 class SoFCSelection;
00039 }
00040
00041 namespace PartGui {
00042
00043
00044 class PartGuiExport ViewProviderCurveNet:public ViewProviderPart
00045 {
00046 PROPERTY_HEADER(PartGui::ViewProviderPart);
00047
00048 public:
00050 ViewProviderCurveNet();
00052 virtual ~ViewProviderCurveNet();
00053
00054 virtual void attach(App::DocumentObject *);
00055 virtual void setDisplayMode(const char* ModeName);
00057 virtual std::vector<std::string> getDisplayModes(void) const;
00058
00060 virtual void updateData(const App::Property*);
00061
00062 virtual bool handleEvent(const SoEvent * const ev,Gui::View3DInventorViewer &Viewer);
00063
00064 protected:
00065 virtual bool setEdit(int ModNum);
00066 virtual void unsetEdit(int ModNum);
00067
00068 struct Node {
00069 Gui::SoFCSelection *pcHighlight;
00070 SoTransform *pcTransform;
00071 };
00072
00073 std::list<Node> NodeList;
00074
00075 bool bInEdit;
00076 bool bMovePointMode;
00077 Node PointToMove;
00079 SoSeparator *EdgeRoot, *VertexRoot;
00080
00081 Standard_Boolean computeEdges (SoSeparator* root, const TopoDS_Shape &myShape);
00082 Standard_Boolean computeVertices(SoSeparator* root, const TopoDS_Shape &myShape);
00083 };
00084
00085 }
00086
00087
00088 #endif // PARTGUI_VIEWPROVIDERCURVENET_H
00089