1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

experimental widget casting functionality

This commit is contained in:
Anatoly Baksheev
2013-07-09 20:02:43 +04:00
parent 509a93c7ce
commit e4c3416f58
3 changed files with 26 additions and 11 deletions
+10
View File
@@ -165,6 +165,16 @@ void temp_viz::Widget3D::setColor(const Color &color)
actor->Modified ();
}
template<> temp_viz::Widget3D temp_viz::Widget::cast<temp_viz::Widget3D>()
{
vtkProp3D *actor = vtkProp3D::SafeDownCast(WidgetAccessor::getProp(*this));
CV_Assert(actor);
Widget3D widget;
WidgetAccessor::setProp(widget, actor);
return widget;
}
///////////////////////////////////////////////////////////////////////////////////////////////
/// widget2D implementation