本文整理汇总了C++中ViewPtr::reset方法的典型用法代码示例。如果您正苦于以下问题:C++ ViewPtr::reset方法的具体用法?C++ ViewPtr::reset怎么用?C++ ViewPtr::reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewPtr
的用法示例。
在下文中一共展示了ViewPtr::reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateView
ViewPtr CreateView(const ViewType::Enum& type, const KinectControllerPtr& kinectController, int width, int height) {
ViewPtr ptr;
switch (type) {
case ViewType::Normal:
ptr.reset(new View(kinectController, width, height));
break;
case ViewType::BwView:
ptr.reset(new BwView(kinectController, width, height));
break;
case ViewType::BwShaderView:
ptr.reset(new BwShaderView(kinectController, width, height));
break;
case ViewType::ColorInvertShaderView:
ptr.reset(new ColorInvertShaderView(kinectController, width, height));
break;
case ViewType::ColorDepthShaderView:
ptr.reset(new ColorDepthShaderView(kinectController, width, height));
break;
case ViewType::MeshView:
ptr.reset(new MeshView(kinectController, width, height));
break;
case ViewType::NormalMapView:
ptr.reset(new NormalMapView(kinectController, width, height));
break;
case ViewType::FatSuitView:
ptr.reset(new FatSuitView(kinectController, width, height));
break;
case ViewType::PointCloudView:
ptr.reset(new MeshView(kinectController, width, height, true));
break;
case ViewType::OutlineView:
ptr.reset(new OutlineView(kinectController, width, height));
break;
case ViewType::Idle:
ptr.reset(new IdleView(kinectController, width, height));
break;
case ViewType::TestView:
ptr.reset(new TestView(kinectController, width, height));
break;
case ViewType::FatSuitWireView:
ptr.reset(new FatSuitWireView(kinectController, width, height));
break;
default:
ptr.reset(new View(kinectController, width, height));
break;
}
return ptr;
}