本文整理汇总了C++中ViewerNodePtr::redrawViewer方法的典型用法代码示例。如果您正苦于以下问题:C++ ViewerNodePtr::redrawViewer方法的具体用法?C++ ViewerNodePtr::redrawViewer怎么用?C++ ViewerNodePtr::redrawViewer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewerNodePtr
的用法示例。
在下文中一共展示了ViewerNodePtr::redrawViewer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
bool
ViewerDisplayScheduler::processFramesResults(const ViewerNodePtr& viewer,const RenderFrameResultsContainerPtr& results)
{
if ( results->frames.empty() ) {
viewer->redrawViewer();
return false;
}
ViewerRenderFrameResultsContainerPtr viewerResults = boost::dynamic_pointer_cast<ViewerRenderFrameResultsContainer>(results);
assert(viewerResults);
bool didSomething = false;
for (std::list<RenderFrameSubResultPtr>::const_iterator it = viewerResults->frames.begin(); it != viewerResults->frames.end(); ++it) {
ViewerRenderFrameSubResult* viewerObject = dynamic_cast<ViewerRenderFrameSubResult*>(it->get());
assert(viewerObject);
ViewerNode::UpdateViewerArgs args;
args.time = results->time;
args.view = (*it)->view;
args.type = viewerObject->textureTransferType;
args.recenterViewer = viewerResults->recenterViewer;
args.viewerCenter = viewerResults->viewerCenter;
for (int i = 0; i < 2; ++i) {
const PerViewerInputRenderData& inputData = viewerObject->perInputsData[i];
ViewerNode::UpdateViewerArgs::TextureUpload upload;
upload.image = inputData.viewerProcessImage;
upload.colorPickerImage = inputData.colorPickerImage;
upload.colorPickerInputImage = inputData.colorPickerInputImage;
upload.viewerProcessImageKey = inputData.viewerProcessImageKey;
if (inputData.retCode == eActionStatusAborted || (inputData.retCode == eActionStatusOK && !upload.image)) {
// If aborted or no image was rendered but the result was OK (one of the reasons could be the caller requested a RoI outside of the bounds of the image), don't transfer any texture, just redraw the viewer.
continue;
}
args.viewerUploads[i].push_back(upload);
}
if (!args.viewerUploads[0].empty() || !args.viewerUploads[1].empty()) {
viewer->updateViewer(args);
didSomething = true;
}
}
viewer->redrawViewer();
return didSomething;
} // processFramesResults