]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug NPAL13178 V4_1_0rc2
authorapo <apo@opencascade.com>
Fri, 7 Dec 2007 10:35:47 +0000 (10:35 +0000)
committerapo <apo@opencascade.com>
Fri, 7 Dec 2007 10:35:47 +0000 (10:35 +0000)
   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)

src/OBJECT/VISU_ScalarMapAct.cxx

index e3e92757e6086fb891ff5079cdf1e4c378d48e47..4d41417b6fe7df900895ce57bee3ec6c2bc9e4ff 100644 (file)
@@ -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);
 }