- void PolyDataToActor::DoProcess()
- {
- polydatamapper->SetInput( bbGetInputIn() );
-
- vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
- vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
-
- vtkactor->GetProperty()->SetColor( bbGetInputColour()[0],
- bbGetInputColour()[1],
- bbGetInputColour()[2] );
-
- vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
-
- if ( bbGetInputTransform()!=NULL )
- {
- vtkactor->SetUserTransform( bbGetInputTransform() );
- }
-
- bbSetOutputOut( vtkactor );
-
- // Interface Update
- if ((firsttime==true) && (bbGetInputRenderer()!=NULL ))
- {
- firsttime=false;
- bbGetInputRenderer()->AddActor( vtkactor );
- }
- }
+ void PolyDataToActor::DoProcess()
+ {
+
+ if (bbGetInputActive()==true)
+ {
+ polydatamapper->SetInput( bbGetInputIn() );
+ vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
+ if (bbGetInputRepresentation()==1)
+ {
+ 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");
+ }
+
+
+ vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
+
+ vtkactor->GetProperty()->SetColor( bbGetInputColour()[0],
+ bbGetInputColour()[1],
+ bbGetInputColour()[2] );
+
+ vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
+
+
+ if ( bbGetInputTransform()!=NULL )
+ {
+ vtkactor->SetUserTransform( bbGetInputTransform() );
+ }
+
+ bbSetOutputOut( vtkactor );
+
+ // Interface Update
+ if ((actorAdded==false) && (bbGetInputRenderer()!=NULL ))
+ {
+ actorAdded=true;
+ bbGetInputRenderer()->AddActor( vtkactor );
+ } // actorAdded
+
+ if (bbGetInputScalarVisibility()==true )
+ {
+ polydatamapper->ScalarVisibilityOn();
+ } else {
+ polydatamapper->ScalarVisibilityOff();
+ } // ScalarVisibility
+ } else {
+ // Interface Update
+ if ((actorAdded==true) && (bbGetInputRenderer()!=NULL ))
+ {
+ actorAdded=false;
+ bbGetInputRenderer()->RemoveActor( vtkactor );
+ } // actorAdded
+ } // Active
+ }
+
+
+