aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Alekhin2016-01-18 04:05:44 -0600
committerAlexander Alekhin2016-01-18 04:05:45 -0600
commit3f8d5be56f8d36ca9bfe4cf86d4989998117968d (patch)
treeca4464c2be742daa2f388e9671b4f7cc2607f25c
parent8203b82f86726313f9aaa1c05accf6c8d7bb3d67 (diff)
parentfcbb57a63f4e51ab12294eaed55afaebdf56fafd (diff)
downloadtiopencv-3f8d5be56f8d36ca9bfe4cf86d4989998117968d.tar.gz
tiopencv-3f8d5be56f8d36ca9bfe4cf86d4989998117968d.tar.xz
tiopencv-3f8d5be56f8d36ca9bfe4cf86d4989998117968d.zip
Merge pull request #5971 from AlexeyAB:correct_lighting_3d_reconstruct
-rw-r--r--modules/viz/include/opencv2/viz/widgets.hpp3
-rw-r--r--modules/viz/src/widget.cpp8
2 files changed, 10 insertions, 1 deletions
diff --git a/modules/viz/include/opencv2/viz/widgets.hpp b/modules/viz/include/opencv2/viz/widgets.hpp
index fde4fc2c7..47b655424 100644
--- a/modules/viz/include/opencv2/viz/widgets.hpp
+++ b/modules/viz/include/opencv2/viz/widgets.hpp
@@ -67,7 +67,8 @@ namespace cv
67 REPRESENTATION, 67 REPRESENTATION,
68 IMMEDIATE_RENDERING, 68 IMMEDIATE_RENDERING,
69 SHADING, 69 SHADING,
70 AMBIENT 70 AMBIENT,
71 LIGHTING
71 }; 72 };
72 73
73 enum RepresentationValues 74 enum RepresentationValues
diff --git a/modules/viz/src/widget.cpp b/modules/viz/src/widget.cpp
index 698f21c9a..3423ba8de 100644
--- a/modules/viz/src/widget.cpp
+++ b/modules/viz/src/widget.cpp
@@ -115,6 +115,14 @@ void cv::viz::Widget::setRenderingProperty(int property, double value)
115 case LINE_WIDTH: actor->GetProperty()->SetLineWidth(float(value)); break; 115 case LINE_WIDTH: actor->GetProperty()->SetLineWidth(float(value)); break;
116 case IMMEDIATE_RENDERING: actor->GetMapper()->SetImmediateModeRendering(int(value)); break; 116 case IMMEDIATE_RENDERING: actor->GetMapper()->SetImmediateModeRendering(int(value)); break;
117 case AMBIENT: actor->GetProperty()->SetAmbient(float(value)); break; 117 case AMBIENT: actor->GetProperty()->SetAmbient(float(value)); break;
118 case LIGHTING:
119 {
120 if (value == 0)
121 actor->GetProperty()->LightingOff();
122 else
123 actor->GetProperty()->LightingOn();
124 break;
125 }
118 case FONT_SIZE: 126 case FONT_SIZE:
119 { 127 {
120 vtkTextActor* text_actor = vtkTextActor::SafeDownCast(actor); 128 vtkTextActor* text_actor = vtkTextActor::SafeDownCast(actor);