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

@@ -1431,7 +1431,11 @@ bool CloudViewer::addTextureMesh (
(*_visualizer->getCloudActorMap())[id].viewpoint_transformation_ = transformation; (*_visualizer->getCloudActorMap())[id].viewpoint_transformation_ = transformation;
#endif #endif
#if VTK_MAJOR_VERSION >= 7
actor->GetProperty()->SetAmbient(0.1);
#else
actor->GetProperty()->SetAmbient(0.5); actor->GetProperty()->SetAmbient(0.5);
#endif
actor->GetProperty()->SetLighting(_aSetLighting->isChecked()); actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
actor->GetProperty()->SetInterpolation(_aSetFlatShading->isChecked()?VTK_FLAT:VTK_PHONG); actor->GetProperty()->SetInterpolation(_aSetFlatShading->isChecked()?VTK_FLAT:VTK_PHONG);
actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked()); actor->GetProperty()->SetEdgeVisibility(_aSetEdgeVisibility->isChecked());