X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_DeviceActor.cxx;h=dc878600a5489ec96672c7eb2892ba0496210e33;hp=c82bbf30524a34ebea0025dc4c3737ebc80775b0;hb=ae29d465091933df101dfac6ae99d3becf4efde7;hpb=88b3dbe23b236bd1746405155ae33a76aaf59ecd diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index c82bbf305..dc878600a 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -119,13 +119,13 @@ SMESH_DeviceActor // Orientation of faces myIsFacesOriented = false; - vtkFloatingPointType anRGB[3] = { 1, 1, 1 }; + double anRGB[3] = { 1, 1, 1 }; SMESH::GetColor( "SMESH", "orientation_color", anRGB[0], anRGB[1], anRGB[2], QColor( 255, 255, 255 ) ); myFaceOrientationFilter = SMESH_FaceOrientationFilter::New(); myFaceOrientationDataMapper = vtkPolyDataMapper::New(); - myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput()); + myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort()); myFaceOrientation = vtkActor::New(); myFaceOrientation->SetMapper(myFaceOrientationDataMapper); @@ -208,9 +208,9 @@ SMESH_DeviceActor { int anId = 0; if(theIsImplicitFunctionUsed) - myPassFilter[ anId ]->SetInput( myExtractGeometry->GetOutput() ); + myPassFilter[ anId ]->SetInputConnection( myExtractGeometry->GetOutputPort() ); else - myPassFilter[ anId ]->SetInput( myMergeFilter->GetOutput() ); + myPassFilter[ anId ]->SetInputConnection( myMergeFilter->GetOutputPort() ); myIsImplicitFunctionUsed = theIsImplicitFunctionUsed; SetStoreClippingMapping(myStoreClippingMapping); @@ -225,32 +225,32 @@ SMESH_DeviceActor //myIsShrinkable = theGrid->GetNumberOfCells() > 10; myIsShrinkable = true; - myExtractUnstructuredGrid->SetInput(theGrid); + myExtractUnstructuredGrid->SetInputData(theGrid); - myMergeFilter->SetGeometry(myExtractUnstructuredGrid->GetOutput()); + myMergeFilter->SetGeometryConnection(myExtractUnstructuredGrid->GetOutputPort()); - myExtractGeometry->SetInput(myMergeFilter->GetOutput()); + myExtractGeometry->SetInputConnection(myMergeFilter->GetOutputPort()); int anId = 0; SetImplicitFunctionUsed(myIsImplicitFunctionUsed); - myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() ); + myPassFilter[ anId + 1]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 1 - myTransformFilter->SetInput( myPassFilter[ anId ]->GetOutput() ); + myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 2 - myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() ); - myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() ); + myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() ); + myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 3 - myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() ); + myGeomFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 4 - myPassFilter[ anId ]->SetInput( myGeomFilter->GetOutput() ); - myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() ); + myPassFilter[ anId ]->SetInputConnection( myGeomFilter->GetOutputPort() ); + myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 5 - myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() ); + myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); vtkLODActor::SetMapper( myMapper ); Modified(); @@ -322,7 +322,7 @@ SMESH_DeviceActor theLookupTable->SetNumberOfTableValues(theScalarBarActor->GetMaximumNumberOfColors()); theLookupTable->Build(); - myMergeFilter->SetScalars(aDataSet); + myMergeFilter->SetScalarsData(aDataSet); aDataSet->Delete(); } GetMapper()->SetScalarVisibility(anIsInitialized); @@ -402,7 +402,7 @@ SMESH_DeviceActor theLookupTable->SetRange(aScalars->GetRange()); theLookupTable->Build(); - myMergeFilter->SetScalars(aDataSet); + myMergeFilter->SetScalarsData(aDataSet); aDataSet->Delete(); } else if (MultiConnection2D* aMultiConnection2D = dynamic_cast(theFunctor.get())){ @@ -462,7 +462,7 @@ SMESH_DeviceActor theLookupTable->SetRange(aScalars->GetRange()); theLookupTable->Build(); - myMergeFilter->SetScalars(aDataSet); + myMergeFilter->SetScalarsData(aDataSet); aDataSet->Delete(); } } @@ -600,10 +600,10 @@ SMESH_DeviceActor ::SetShrink() { if ( !myIsShrinkable ) return; - if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() ) + if ( vtkAlgorithmOutput* aDataSet = myPassFilter[ 0 ]->GetOutputPort() ) { - myShrinkFilter->SetInput( aDataSet ); - myPassFilter[ 1 ]->SetInput( myShrinkFilter->GetOutput() ); + myShrinkFilter->SetInputConnection( aDataSet ); + myPassFilter[ 1 ]->SetInputConnection( myShrinkFilter->GetOutputPort() ); myIsShrunk = true; } } @@ -613,9 +613,9 @@ SMESH_DeviceActor ::UnShrink() { if ( !myIsShrunk ) return; - if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() ) + if ( vtkAlgorithmOutput* aDataSet = myPassFilter[ 0 ]->GetOutputPort() ) { - myPassFilter[ 1 ]->SetInput( aDataSet ); + myPassFilter[ 1 ]->SetInputConnection( aDataSet ); myPassFilter[ 1 ]->Modified(); myIsShrunk = false; Modified(); @@ -627,37 +627,37 @@ void SMESH_DeviceActor ::SetFacesOriented(bool theIsFacesOriented) { - if ( vtkDataSet* aDataSet = myTransformFilter->GetOutput() ) + if ( vtkAlgorithmOutput* aDataSet = myTransformFilter->GetOutputPort() ) { myIsFacesOriented = theIsFacesOriented; if( theIsFacesOriented ) - myFaceOrientationFilter->SetInput( aDataSet ); + myFaceOrientationFilter->SetInputConnection( aDataSet ); UpdateFaceOrientation(); } } void SMESH_DeviceActor -::SetFacesOrientationColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) +::SetFacesOrientationColor(double r,double g,double b) { myFaceOrientation->GetProperty()->SetColor( r, g, b ); } void SMESH_DeviceActor -::GetFacesOrientationColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) +::GetFacesOrientationColor(double& r,double& g,double& b) { myFaceOrientation->GetProperty()->GetColor( r, g, b ); } void SMESH_DeviceActor -::SetFacesOrientationScale(vtkFloatingPointType theScale) +::SetFacesOrientationScale(double theScale) { myFaceOrientationFilter->SetOrientationScale( theScale ); } -vtkFloatingPointType +double SMESH_DeviceActor ::GetFacesOrientationScale() { @@ -780,13 +780,13 @@ SMESH_DeviceActor return aRetID; } -vtkFloatingPointType* +double* SMESH_DeviceActor ::GetNodeCoord(int theObjID) { vtkDataSet* aDataSet = myMergeFilter->GetOutput(); vtkIdType anID = myVisualObj->GetNodeVTKId(theObjID); - vtkFloatingPointType* aCoord = (anID >=0) ? aDataSet->GetPoint(anID) : NULL; + double* aCoord = (anID >=0) ? aDataSet->GetPoint(anID) : NULL; if(MYDEBUG) MESSAGE("GetNodeCoord - theObjID = "<