From 4991d6610e749af260232b17b612de7435a5dff0 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Mon, 8 Apr 2019 21:08:58 +0200 Subject: [PATCH] #3250 BBTK Bug New Normal - Light configuration for surface or wireframe in bbvtkPolyDataToActor box --- packages/vtk/src/bbvtkPolyDataToActor.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/vtk/src/bbvtkPolyDataToActor.cxx b/packages/vtk/src/bbvtkPolyDataToActor.cxx index ed7966c..ba44143 100644 --- a/packages/vtk/src/bbvtkPolyDataToActor.cxx +++ b/packages/vtk/src/bbvtkPolyDataToActor.cxx @@ -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() ); -- 2.45.1