mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
Merge pull request #5971 from AlexeyAB:correct_lighting_3d_reconstruct
This commit is contained in:
commit
3f8d5be56f
@ -67,7 +67,8 @@ namespace cv
|
|||||||
REPRESENTATION,
|
REPRESENTATION,
|
||||||
IMMEDIATE_RENDERING,
|
IMMEDIATE_RENDERING,
|
||||||
SHADING,
|
SHADING,
|
||||||
AMBIENT
|
AMBIENT,
|
||||||
|
LIGHTING
|
||||||
};
|
};
|
||||||
|
|
||||||
enum RepresentationValues
|
enum RepresentationValues
|
||||||
|
@ -115,6 +115,14 @@ void cv::viz::Widget::setRenderingProperty(int property, double value)
|
|||||||
case LINE_WIDTH: actor->GetProperty()->SetLineWidth(float(value)); break;
|
case LINE_WIDTH: actor->GetProperty()->SetLineWidth(float(value)); break;
|
||||||
case IMMEDIATE_RENDERING: actor->GetMapper()->SetImmediateModeRendering(int(value)); break;
|
case IMMEDIATE_RENDERING: actor->GetMapper()->SetImmediateModeRendering(int(value)); break;
|
||||||
case AMBIENT: actor->GetProperty()->SetAmbient(float(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:
|
case FONT_SIZE:
|
||||||
{
|
{
|
||||||
vtkTextActor* text_actor = vtkTextActor::SafeDownCast(actor);
|
vtkTextActor* text_actor = vtkTextActor::SafeDownCast(actor);
|
||||||
|
Loading…
Reference in New Issue
Block a user