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);
+}