Back to index

salome-smesh  6.5.0
SMESH_FaceOrientationFilter.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef SMESH_FACEORIENTATIONFILTER_H
00021 #define SMESH_FACEORIENTATIONFILTER_H
00022 
00023 #include "SMESH_Object.h"
00024 
00025 #include <vtkPolyDataAlgorithm.h>
00026 
00027 class vtkGlyph3D;
00028 class vtkGlyphSource2D;
00029 class vtkMaskPoints;
00030 
00031 class VTKViewer_CellCenters;
00032 
00033 class SMESHOBJECT_EXPORT SMESH_FaceOrientationFilter : public vtkPolyDataAlgorithm
00034 {
00035 public:
00036   vtkTypeRevisionMacro( SMESH_FaceOrientationFilter, vtkPolyDataAlgorithm );
00037 
00039   static SMESH_FaceOrientationFilter *New();
00040 
00041   void SetOrientationScale( vtkFloatingPointType );
00042   vtkFloatingPointType GetOrientationScale() const { return myOrientationScale; }
00043 
00044   void Set3dVectors( bool );
00045   bool Get3dVectors() const { return my3dVectors; }
00046 
00047 protected:
00048   SMESH_FaceOrientationFilter();
00049   virtual ~SMESH_FaceOrientationFilter();
00050 
00051   virtual int RequestData(vtkInformation *, vtkInformationVector **,
00052                           vtkInformationVector *); //generate output data
00053 
00054   virtual int FillInputPortInformation(int port, vtkInformation *info);
00055 
00056   vtkPolyData* CreateArrowPolyData();
00057 
00058 private:
00059   SMESH_FaceOrientationFilter( const SMESH_FaceOrientationFilter& );  
00060   void operator=( const SMESH_FaceOrientationFilter& );               
00061 
00062 private:
00063   bool my3dVectors;
00064   vtkFloatingPointType myOrientationScale;
00065   vtkPolyData* myArrowPolyData;
00066   vtkPolyData* myFacePolyData;
00067   VTKViewer_CellCenters* myFaceCenters;
00068   vtkMaskPoints* myFaceMaskPoints;
00069   vtkGlyphSource2D* myGlyphSource;
00070   vtkGlyph3D* myBaseGlyph;
00071 };
00072 
00073 #endif