Salome HOME
Update copyrights
[modules/smesh.git] / src / OBJECT / SMESH_FaceOrientationFilter.h
1 // Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef SMESH_FACEORIENTATIONFILTER_H
21 #define SMESH_FACEORIENTATIONFILTER_H
22
23 #include "SMESH_Object.h"
24
25 #include <vtkPolyDataAlgorithm.h>
26
27 class vtkGlyph3D;
28 class vtkGlyphSource2D;
29 class vtkMaskPoints;
30
31 class VTKViewer_CellCenters;
32
33 class SMESHOBJECT_EXPORT SMESH_FaceOrientationFilter : public vtkPolyDataAlgorithm
34 {
35 public:
36   vtkTypeMacro( SMESH_FaceOrientationFilter, vtkPolyDataAlgorithm );
37
38   /*!Create a new SMESH_FaceOrientationFilter.*/
39   static SMESH_FaceOrientationFilter *New();
40
41   void SetOrientationScale( double );
42   double GetOrientationScale() const { return myOrientationScale; }
43
44   void Set3dVectors( bool );
45   bool Get3dVectors() const { return my3dVectors; }
46
47 protected:
48   SMESH_FaceOrientationFilter();
49   virtual ~SMESH_FaceOrientationFilter();
50
51   virtual int RequestData(vtkInformation *, vtkInformationVector **,
52                           vtkInformationVector *); //generate output data
53
54   virtual int FillInputPortInformation(int port, vtkInformation *info);
55
56   vtkPolyData* CreateArrowPolyData();
57
58 private:
59   SMESH_FaceOrientationFilter( const SMESH_FaceOrientationFilter& );  //!< Not implemented.
60   void operator=( const SMESH_FaceOrientationFilter& );               //!< Not implemented.
61
62 private:
63   bool my3dVectors;
64   double myOrientationScale;
65   vtkPolyData* myArrowPolyData;
66   vtkPolyData* myFacePolyData;
67   VTKViewer_CellCenters* myFaceCenters;
68   vtkMaskPoints* myFaceMaskPoints;
69   vtkGlyphSource2D* myGlyphSource;
70   vtkGlyph3D* myBaseGlyph;
71 };
72
73 #endif