]> Creatis software - bbtk.git/commitdiff
#3250 BBTK Bug New Normal - Light configuration for surface or wireframe in bbvtkPo...
authorEduardo DAVILA <davila@localhost.localdomain>
Mon, 8 Apr 2019 19:08:58 +0000 (21:08 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Mon, 8 Apr 2019 19:08:58 +0000 (21:08 +0200)
packages/vtk/src/bbvtkPolyDataToActor.cxx

index ed7966c13c7f48e50ba0572d2d847cdbdb9762b7..ba441439b4cb99b5466141ac7029ceb69ec2b190 100644 (file)
@@ -83,7 +83,7 @@ namespace bbvtk
 //     polydatamapper->SetInput(marchingcubes->GetOutput());
      vtkactor->SetMapper(polydatamapper);
 
-     polydatamapper->ImmediateModeRenderingOn();
+//     polydatamapper->ImmediateModeRenderingOn();
    }
 
        //---------------------------------------------------------------------
@@ -118,13 +118,22 @@ namespace bbvtk
 
                         vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
 
-                       if (bbGetInputRepresentation()==1)
+                       if (bbGetInputRepresentation()==0)
                        {
                                 vtkactor->GetProperty()->SetAmbient(1);
                                 vtkactor->GetProperty()->SetDiffuse(1);
                                 vtkactor->GetProperty()->SetSpecular(0);
-                       } else {
-printf("EED WARNNING!  PolyDataToActor::DoProcess  which is the default values of Ambient, Diffuse, Specular ? \n");
+printf("EED WARNNING!  PolyDataToActor::DoProcess  which is the default values of Ambient, Diffuse, Specular for points option? \n");
+                       } else if (bbGetInputRepresentation()==1)
+                       {
+                                vtkactor->GetProperty()->SetAmbient(1);
+                                vtkactor->GetProperty()->SetDiffuse(1);
+                                vtkactor->GetProperty()->SetSpecular(0);
+                       } else if (bbGetInputRepresentation()==2)
+                       {
+                                vtkactor->GetProperty()->SetAmbient(0);
+                                vtkactor->GetProperty()->SetDiffuse(1);
+                                vtkactor->GetProperty()->SetSpecular(0);
                        }
 
                         vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );