From: apo Date: Fri, 7 Dec 2007 10:35:47 +0000 (+0000) Subject: Fix for Bug NPAL13178 X-Git-Tag: V4_1_0rc2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c00aaac6a5db3741df53905e5043f58704854024;p=modules%2Fvisu.git Fix for Bug NPAL13178 EDF243 VISU : post_processing for fields at nodes (An add-on: to insist on VTK_POINTS representation mode when the native vtkOpenGLPolyDataMapper algorithm is used) --- diff --git a/src/OBJECT/VISU_ScalarMapAct.cxx b/src/OBJECT/VISU_ScalarMapAct.cxx index e3e92757..4d41417b 100644 --- a/src/OBJECT/VISU_ScalarMapAct.cxx +++ b/src/OBJECT/VISU_ScalarMapAct.cxx @@ -217,32 +217,29 @@ VISU_ScalarMapAct myScalarBar = VISU_ScalarBarActor::New(); vtkProperty* aProperty = GetProperty(); - //aProperty->SetAmbient(0.5); - //aProperty->SetDiffuse(0.2); - //aProperty->SetSpecular(0.2); aProperty->SetAmbient(1.0); aProperty->SetDiffuse(0.0); aProperty->SetSpecular(0.0); myProperty->DeepCopy(aProperty); - vtkMatrix4x4 *m; - m = vtkMatrix4x4::New(); + vtkMatrix4x4 *aMatrix = vtkMatrix4x4::New(); mySurfaceActor= SVTK_DeviceActor::New(); mySurfaceActor->SetRepresentation(SVTK::Representation::Surface); mySurfaceActor->SetProperty(aProperty); - mySurfaceActor->SetUserMatrix(m); + mySurfaceActor->SetUserMatrix(aMatrix); myEdgeActor = SVTK_DeviceActor::New(); myEdgeActor->SetRepresentation(SVTK::Representation::Wireframe); - myEdgeActor->SetUserMatrix(m); + myEdgeActor->SetUserMatrix(aMatrix); myEdgeActor->GetProperty()->SetColor(255.,255.,255.); myPointsActor = VISU_PointsDeviceActor::New(); - myPointsActor->SetUserMatrix(m); + myPointsActor->SetProperty(aProperty); + myPointsActor->SetUserMatrix(aMatrix); - m->Delete(); + aMatrix->Delete(); } //---------------------------------------------------------------------------- @@ -456,11 +453,14 @@ VISU_ScalarMapAct bool anIsShanding = IsShading(); Superclass::SetRepresentation(theMode); + if(theMode == SVTK::Representation::Surfaceframe) mySurfaceActor->SetRepresentation(SVTK::Representation::Surface); else mySurfaceActor->SetRepresentation(theMode); + myPointsActor->SetProperty( mySurfaceActor->GetProperty() ); + SetShading(anIsShanding); }