ViewProviderCurveNet.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.de>              *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
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 } // namespace PartGui
00086 
00087 
00088 #endif // PARTGUI_VIEWPROVIDERCURVENET_H
00089 

Generated on Wed Nov 23 19:00:58 2011 for FreeCAD by  doxygen 1.6.1