myScalarBar = VISU_ScalarBarActor::New();
vtkProperty* aProperty = GetProperty();
- aProperty->SetAmbient(0.5);
- aProperty->SetDiffuse(0.2);
- aProperty->SetSpecular(0.2);
- //aProperty->SetAmbient(1.0);
- //aProperty->SetDiffuse(0.0);
- //aProperty->SetSpecular(0.0);
-
+ //aProperty->SetAmbient(0.5);
+ //aProperty->SetDiffuse(0.2);
+ //aProperty->SetSpecular(0.2);
+ aProperty->SetAmbient(1.0);
+ aProperty->SetDiffuse(0.0);
+ aProperty->SetSpecular(0.0);
+
myProperty->DeepCopy(aProperty);
}
myBarVisibility = theMode;
if(myScalarBar) myScalarBar->SetVisibility(myBarVisibility);
}
+
+void VISU_ScalarMapAct::SetShading(bool theOn)
+{
+ vtkProperty* aProperty = GetProperty();
+
+ if (theOn)
+ {
+ aProperty->SetAmbient(0.0);
+ aProperty->SetDiffuse(1.0);
+ }
+ else
+ {
+ aProperty->SetAmbient(1.0);
+ aProperty->SetDiffuse(0.0);
+ }
+ myProperty->DeepCopy(aProperty);
+}
+
+bool VISU_ScalarMapAct::IsShading()
+{
+ vtkProperty* aProperty = GetProperty();
+
+ return (aProperty->GetAmbient() == 0 && aProperty->GetDiffuse() == 1);
+}