Merge pull request #5971 from AlexeyAB:correct_lighting_3d_reconstruct

This commit is contained in:
Alexander Alekhin 2016-01-18 10:05:44 +00:00
commit 3f8d5be56f
2 changed files with 10 additions and 1 deletions

View File

@ -67,7 +67,8 @@ namespace cv
REPRESENTATION,
IMMEDIATE_RENDERING,
SHADING,
AMBIENT
AMBIENT,
LIGHTING
};
enum RepresentationValues

View File

@ -115,6 +115,14 @@ void cv::viz::Widget::setRenderingProperty(int property, double value)
case LINE_WIDTH: actor->GetProperty()->SetLineWidth(float(value)); break;
case IMMEDIATE_RENDERING: actor->GetMapper()->SetImmediateModeRendering(int(value)); break;
case AMBIENT: actor->GetProperty()->SetAmbient(float(value)); break;
case LIGHTING:
{
if (value == 0)
actor->GetProperty()->LightingOff();
else
actor->GetProperty()->LightingOn();
break;
}
case FONT_SIZE:
{
vtkTextActor* text_actor = vtkTextActor::SafeDownCast(actor);