X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_FaceOrientationFilter.cxx;h=3060141c23f47221f4ec47e384b3c90b812f3850;hb=204a3246f4d94d4375bdac7391bec2b3ab49e0d9;hp=da38ecf2f11f532fc315375ce4cae7813f5abfeb;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/OBJECT/SMESH_FaceOrientationFilter.cxx b/src/OBJECT/SMESH_FaceOrientationFilter.cxx index da38ecf2f..3060141c2 100644 --- a/src/OBJECT/SMESH_FaceOrientationFilter.cxx +++ b/src/OBJECT/SMESH_FaceOrientationFilter.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -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(); }