ViewProviderDefects.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2006 Werner Mayer <wmayer[at]users.sourceforge.net>     *
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 #ifndef MESHGUI_VIEWPROVIDER_MESH_DEFECTS_H
00024 #define MESHGUI_VIEWPROVIDER_MESH_DEFECTS_H
00025 
00026 #include "ViewProvider.h"
00027 
00028 class SoCoordinate3;
00029 class SoPointSet;
00030 class SoLineSet;
00031 class SoFaceSet;
00032 
00033 namespace MeshGui {
00034 
00039 class MeshGuiExport ViewProviderMeshDefects : public Gui::ViewProviderDocumentObject
00040 {
00041     PROPERTY_HEADER(MeshGui::ViewProviderMeshDefects);
00042 
00043 public:
00044     ViewProviderMeshDefects();
00045     virtual ~ViewProviderMeshDefects();
00046 
00047     // Display properties
00048     App::PropertyFloat LineWidth;
00049 
00050     // Build up the initial Inventor node
00051     virtual void attach(App::DocumentObject* pcFeature) = 0;
00053     virtual void showDefects(const std::vector<unsigned long>&) = 0;
00054 
00055 protected:
00057     void onChanged(const App::Property* prop);
00058 
00059     SoCoordinate3 * pcCoords;
00060     SoDrawStyle   * pcDrawStyle;
00061 };
00062 
00066 class MeshGuiExport ViewProviderMeshOrientation : public ViewProviderMeshDefects
00067 {
00068     PROPERTY_HEADER(MeshGui::ViewProviderMeshOrientation);
00069 
00070 public:
00071     ViewProviderMeshOrientation();
00072     virtual ~ViewProviderMeshOrientation();
00073 
00074     void attach(App::DocumentObject* pcFeature);
00075     void showDefects(const std::vector<unsigned long>&);
00076 
00077 protected:
00078     SoFaceSet* pcFaces;
00079 };
00080 
00084 class MeshGuiExport ViewProviderMeshNonManifolds : public ViewProviderMeshDefects
00085 {
00086     PROPERTY_HEADER(MeshGui::ViewProviderMeshNonManifolds);
00087 
00088 public:
00089     ViewProviderMeshNonManifolds();
00090     virtual ~ViewProviderMeshNonManifolds();
00091 
00092     void attach(App::DocumentObject* pcFeature);
00093     void showDefects(const std::vector<unsigned long>&);
00094 
00095 protected:
00096     SoLineSet* pcLines;
00097 };
00098 
00102 class MeshGuiExport ViewProviderMeshDuplicatedFaces : public ViewProviderMeshDefects
00103 {
00104     PROPERTY_HEADER(MeshGui::ViewProviderMeshDuplicatedFaces);
00105 
00106 public:
00107     ViewProviderMeshDuplicatedFaces();
00108     virtual ~ViewProviderMeshDuplicatedFaces();
00109 
00110     void attach(App::DocumentObject* pcFeature);
00111     void showDefects(const std::vector<unsigned long>&);
00112 
00113 protected:
00114     SoFaceSet* pcFaces;
00115 };
00116 
00120 class MeshGuiExport ViewProviderMeshDegenerations : public ViewProviderMeshDefects
00121 {
00122     PROPERTY_HEADER(MeshGui::ViewProviderMeshDegenerations);
00123 
00124 public:
00125     ViewProviderMeshDegenerations();
00126     virtual ~ViewProviderMeshDegenerations();
00127 
00128     void attach(App::DocumentObject* pcFeature);
00129     void showDefects(const std::vector<unsigned long>&);
00130 
00131 protected:
00132     SoLineSet* pcLines;
00133 };
00134 
00135 class MeshGuiExport ViewProviderMeshDuplicatedPoints : public ViewProviderMeshDefects
00136 {
00137     PROPERTY_HEADER(MeshGui::ViewProviderMeshDuplicatedPoints);
00138 
00139 public:
00140     ViewProviderMeshDuplicatedPoints();
00141     virtual ~ViewProviderMeshDuplicatedPoints();
00142 
00143     void attach(App::DocumentObject* pcFeature);
00144     void showDefects(const std::vector<unsigned long>&);
00145 
00146 protected:
00147     SoPointSet* pcPoints;
00148 };
00149 
00150 class MeshGuiExport ViewProviderMeshIndices : public ViewProviderMeshDefects
00151 {
00152     PROPERTY_HEADER(MeshGui::ViewProviderMeshIndices);
00153 
00154 public:
00155     ViewProviderMeshIndices();
00156     virtual ~ViewProviderMeshIndices();
00157 
00158     void attach(App::DocumentObject* pcFeature);
00159     void showDefects(const std::vector<unsigned long>&);
00160 
00161 protected:
00162     SoFaceSet* pcFaces;
00163 };
00164 
00168 class MeshGuiExport ViewProviderMeshSelfIntersections : public ViewProviderMeshDefects
00169 {
00170     PROPERTY_HEADER(MeshGui::ViewProviderMeshSelfIntersections);
00171 
00172 public:
00173     ViewProviderMeshSelfIntersections();
00174     virtual ~ViewProviderMeshSelfIntersections();
00175 
00176     void attach(App::DocumentObject* pcFeature);
00177     void showDefects(const std::vector<unsigned long>&);
00178 
00179 protected:
00180     SoLineSet* pcLines;
00181 };
00182 
00183 class MeshGuiExport ViewProviderMeshFolds : public ViewProviderMeshDefects
00184 {
00185     PROPERTY_HEADER(MeshGui::ViewProviderMeshFolds);
00186 
00187 public:
00188     ViewProviderMeshFolds();
00189     virtual ~ViewProviderMeshFolds();
00190 
00191     void attach(App::DocumentObject* pcFeature);
00192     void showDefects(const std::vector<unsigned long>&);
00193 
00194 protected:
00195     SoFaceSet* pcFaces;
00196 };
00197 
00198 } // namespace MeshGui
00199 
00200 
00201 #endif // MESHGUI_VIEWPROVIDER_MESH_DEFECTS_H
00202 

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