From: Eduardo DAVILA Date: Wed, 28 Apr 2021 17:05:18 +0000 (+0200) Subject: #3461 clean box Actor X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=ef4eec7fcb7c3935bbd07dfbe5a75821c461325c;p=creaVtk.git #3461 clean box Actor --- diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx index 19626b8..2d52f39 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx @@ -33,42 +33,43 @@ void Actor::Process() // std::cout << "Output value = " <GetClassName(); - std::string wantedClass = "vtkOpenGLActor"; - if(className == wantedClass) - { - vtkActor *vtkactor=((vtkActor*)vtkprop3D); - vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() ); - vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() ); - double r = bbGetInputColor()[0]; - double g = bbGetInputColor()[1]; - double b = bbGetInputColor()[2]; - vtkactor->GetProperty()->SetColor( r,g,b ); - } - - if ( bbGetInputTransform()!=NULL ) - { - vtkprop3D->SetUserTransform( bbGetInputTransform() ); - } - -// bbSetOutputOut( vtkactor ); - - // Interface Update - - if ((bbGetInputRenderer()!=NULL) && ( backActive!=bbGetInputActive() )) + if (bbGetInputIn()!=NULL) { - - if (bbGetInputActive()==true ) - { - bbGetInputRenderer()->AddActor( vtkprop3D ); - } else { - bbGetInputRenderer()->RemoveActor( vtkprop3D ); - } //if Active - backActive=bbGetInputActive(); - } // if Renderer + vtkProp3D* vtkprop3D=bbGetInputIn(); + std::string className = vtkprop3D->GetClassName(); + std::string wantedClass = "vtkOpenGLActor"; + if(className == wantedClass) + { + vtkActor *vtkactor=((vtkActor*)vtkprop3D); + vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() ); + vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() ); + double r = bbGetInputColor()[0]; + double g = bbGetInputColor()[1]; + double b = bbGetInputColor()[2]; + vtkactor->GetProperty()->SetColor( r,g,b ); + } + + if ( bbGetInputTransform()!=NULL ) + { + vtkprop3D->SetUserTransform( bbGetInputTransform() ); + } + + // bbSetOutputOut( vtkactor ); + + // Interface Update + + if ((bbGetInputRenderer()!=NULL) && ( backActive!=bbGetInputActive() )) + { + + if (bbGetInputActive()==true ) + { + bbGetInputRenderer()->AddActor( vtkprop3D ); + } else { + bbGetInputRenderer()->RemoveActor( vtkprop3D ); + } //if Active + backActive=bbGetInputActive(); + } // if Renderer + }// bbGetInputIn } //=====