CloudViewer: reduced ambient lighting for textureMesh with VTK>=7

This commit is contained in:
matlabbe
2020-06-18 11:28:53 -04:00
parent db00f55981
commit fb6659e29d

View File

@@ -1430,8 +1430,12 @@ bool CloudViewer::addTextureMesh (
// Save the viewpoint transformation matrix to the global actor map
(*_visualizer->getCloudActorMap())[id].viewpoint_transformation_ = transformation;
#endif
actor->GetProperty()->SetAmbient(0.5);
#if VTK_MAJOR_VERSION >= 7
actor->GetProperty()->SetAmbient(0.1);
#else
actor->GetProperty()->SetAmbient(0.5);
#endif
actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
actor->GetProperty()->SetInterpolation(_aSetFlatShading->isChecked()?VTK_FLAT:VTK_PHONG);
actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());