mesh widget casting

This commit is contained in:
ozantonkal 2013-07-15 12:02:53 +02:00
parent b066d1982f
commit 25f98bc022
2 changed files with 7 additions and 0 deletions

View File

@ -185,6 +185,7 @@ namespace cv
template<> CV_EXPORTS TextWidget Widget::cast<TextWidget>();
template<> CV_EXPORTS CloudWidget Widget::cast<CloudWidget>();
template<> CV_EXPORTS CloudNormalsWidget Widget::cast<CloudNormalsWidget>();
template<> CV_EXPORTS MeshWidget Widget::cast<MeshWidget>();
} /* namespace viz */
} /* namespace cv */

View File

@ -464,3 +464,9 @@ cv::viz::MeshWidget::MeshWidget(const Mesh3d &mesh)
WidgetAccessor::setProp(*this, actor);
}
template<> CV_EXPORTS cv::viz::MeshWidget cv::viz::Widget::cast<cv::viz::MeshWidget>()
{
Widget3D widget = this->cast<Widget3D>();
return static_cast<MeshWidget&>(widget);
}