From: Eduardo DAVILA Date: Mon, 8 Apr 2019 19:08:58 +0000 (+0200) Subject: #3250 BBTK Bug New Normal - Light configuration for surface or wireframe in bbvtkPo... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4991d6610e749af260232b17b612de7435a5dff0;p=bbtk.git #3250 BBTK Bug New Normal - Light configuration for surface or wireframe in bbvtkPolyDataToActor box --- 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() );