mesh widget casting

pull/1453/head
ozantonkal 12 years ago
parent b066d1982f
commit 25f98bc022
  1. 1
      modules/viz/include/opencv2/viz/widgets.hpp
  2. 6
      modules/viz/src/cloud_widgets.cpp

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

@ -464,3 +464,9 @@ cv::viz::MeshWidget::MeshWidget(const Mesh3d &mesh)
WidgetAccessor::setProp(*this, actor); 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);
}
Loading…
Cancel
Save