本文整理汇总了C++中ViewPtr::getWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ ViewPtr::getWidth方法的具体用法?C++ ViewPtr::getWidth怎么用?C++ ViewPtr::getWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewPtr
的用法示例。
在下文中一共展示了ViewPtr::getWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
void WbpSceneExporter::write()
{
MqoDisplayContext *pmqodc = MB_NEW MqoDisplayContext();
m_mqoRelPath = makeRelSubPath("mqo");
LString str_wbppath = getPath();
LString str_mqopath = getPath("mqo");
// Mqo substream
qlib::OutStream *pOutMqo = createOutStream("mqo");
ScenePtr pScene = getClient();
CameraPtr pCam = getCamera();
qlib::ensureNotNull(pCam.get());
pmqodc->init(pOutMqo);
pmqodc->setGradSteps(m_nGradSteps);
pmqodc->setClipZ(m_bUseClipZ);
pmqodc->setPerspective(m_bPerspective);
pmqodc->setBgColor(pScene->getBgColor());
double zoom = pCam->getZoom();
pmqodc->setZoom(zoom);
pmqodc->setSlabDepth(pCam->getSlabDepth());
pmqodc->setViewDist(pCam->getCamDist());
pmqodc->loadIdent();
pmqodc->rotate(pCam->m_rotQuat);
pmqodc->translate(-(pCam->m_center));
// calc line width factor
if (pScene->getViewCount()>0) {
ViewPtr pView = pScene->beginView()->second;
double wpix = pView->getWidth();
pmqodc->setLineScale(zoom/wpix);
}
pScene->display(pmqodc);
// cleanup the created streams
pOutMqo->close();
delete pOutMqo;
// Write wbp main stream
// Enter the context
{
m_pdc = pmqodc;
AutoStyleCtxt style_ctxt(pScene->getUID());
writeWbp();
m_pdc = NULL;
}
delete pmqodc;
}