-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 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
#define PI 3.14159265359
-vtkCxxRevisionMacro(SMESH_FaceOrientationFilter, "$Revision$");
vtkStandardNewMacro(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();
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()
myBaseGlyph->Delete();
}
-void SMESH_FaceOrientationFilter::SetOrientationScale( vtkFloatingPointType theScale )
+void SMESH_FaceOrientationFilter::SetOrientationScale( double theScale )
{
myOrientationScale = theScale;
Modified();
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();
}