Salome HOME
PR: merged from V5_1_4rc1
[modules/smesh.git] / src / OBJECT / SMESH_FaceOrientationFilter.h
1 //  Copyright (C) 2007-2010  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.
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 vtkCellCenters;
28 class vtkGlyph3D;
29 class vtkGlyphSource2D;
30 class vtkMaskPoints;
31
32 class SMESHOBJECT_EXPORT SMESH_FaceOrientationFilter : public vtkPolyDataAlgorithm
33 {
34 public:
35   vtkTypeRevisionMacro( SMESH_FaceOrientationFilter, vtkPolyDataAlgorithm );
36
37   /*!Create a new SMESH_FaceOrientationFilter.*/
38   static SMESH_FaceOrientationFilter *New();
39
40   void SetOrientationScale( vtkFloatingPointType );
41   vtkFloatingPointType GetOrientationScale() const { return myOrientationScale; }
42
43   void Set3dVectors( bool );
44   bool Get3dVectors() const { return my3dVectors; }
45
46 protected:
47   SMESH_FaceOrientationFilter();
48   virtual ~SMESH_FaceOrientationFilter();
49
50   virtual int RequestData(vtkInformation *, vtkInformationVector **,
51                           vtkInformationVector *); //generate output data
52
53   virtual int FillInputPortInformation(int port, vtkInformation *info);
54
55   vtkPolyData* CreateArrowPolyData();
56
57 private:
58   SMESH_FaceOrientationFilter( const SMESH_FaceOrientationFilter& );  //!< Not implemented.
59   void operator=( const SMESH_FaceOrientationFilter& );               //!< Not implemented.
60
61 private:
62   bool my3dVectors;
63   vtkFloatingPointType myOrientationScale;
64   vtkPolyData* myArrowPolyData;
65   vtkPolyData* myFacePolyData;
66   vtkCellCenters* myFaceCenters;
67   vtkMaskPoints* myFaceMaskPoints;
68   vtkGlyphSource2D* myGlyphSource;
69   vtkGlyph3D* myBaseGlyph;
70 };
71
72 #endif