Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/smesh.git] / src / OBJECT / SMESH_FaceOrientationFilter.cxx
index da38ecf2f11f532fc315375ce4cae7813f5abfeb..46a646912f6e94c10495d8ca831e7c323fb67b4d 100644 (file)
@@ -42,7 +42,6 @@
 
 #define PI   3.14159265359
 
-vtkCxxRevisionMacro(SMESH_FaceOrientationFilter, "$Revision$");
 vtkStandardNewMacro(SMESH_FaceOrientationFilter);
 
 /*!
@@ -61,10 +60,10 @@ SMESH_FaceOrientationFilter::SMESH_FaceOrientationFilter()
   myFacePolyData = vtkPolyData::New();
 
   myFaceCenters = VTKViewer_CellCenters::New();
-  myFaceCenters->SetInput(myFacePolyData);
+  myFaceCenters->SetInputData(myFacePolyData);
 
   myFaceMaskPoints = vtkMaskPoints::New();
-  myFaceMaskPoints->SetInput(myFaceCenters->GetOutput());
+  myFaceMaskPoints->SetInputConnection(myFaceCenters->GetOutputPort());
   myFaceMaskPoints->SetOnRatio(1);
 
   myGlyphSource = vtkGlyphSource2D::New();
@@ -73,11 +72,14 @@ SMESH_FaceOrientationFilter::SMESH_FaceOrientationFilter()
   myGlyphSource->SetCenter(0.5, 0.0, 0.0);
 
   myBaseGlyph = vtkGlyph3D::New();
-  myBaseGlyph->SetInput(myFaceMaskPoints->GetOutput());
+  myBaseGlyph->SetInputConnection(myFaceMaskPoints->GetOutputPort());
   myBaseGlyph->SetVectorModeToUseVector();
   myBaseGlyph->SetScaleModeToDataScalingOff();
   myBaseGlyph->SetColorModeToColorByScalar();
-  myBaseGlyph->SetSource(my3dVectors ? myArrowPolyData : myGlyphSource->GetOutput());
+  if( my3dVectors )
+    myBaseGlyph->SetSourceData(myArrowPolyData);
+  else
+    myBaseGlyph->SetSourceConnection(myGlyphSource->GetOutputPort());
 }
 
 SMESH_FaceOrientationFilter::~SMESH_FaceOrientationFilter()
@@ -90,7 +92,7 @@ SMESH_FaceOrientationFilter::~SMESH_FaceOrientationFilter()
   myBaseGlyph->Delete();
 }
 
-void SMESH_FaceOrientationFilter::SetOrientationScale( vtkFloatingPointType theScale )
+void SMESH_FaceOrientationFilter::SetOrientationScale( double theScale )
 {
   myOrientationScale = theScale;
   Modified();
@@ -99,7 +101,10 @@ void SMESH_FaceOrientationFilter::SetOrientationScale( vtkFloatingPointType theS
 void SMESH_FaceOrientationFilter::Set3dVectors( bool theState )
 {
   my3dVectors = theState;
-  myBaseGlyph->SetSource(my3dVectors ? myArrowPolyData : myGlyphSource->GetOutput());
+  if( my3dVectors )
+    myBaseGlyph->SetSourceData(myArrowPolyData);
+  else
+    myBaseGlyph->SetSourceConnection(myGlyphSource->GetOutputPort());
   Modified();
 }