本文整理汇总了C++中ViewPtr类的典型用法代码示例。如果您正苦于以下问题:C++ ViewPtr类的具体用法?C++ ViewPtr怎么用?C++ ViewPtr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ViewPtr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: addRepActorsToViewRenderer
/**
* Adds rep assigned actors to the active renderer
*/
void FiberBundleRep::addRepActorsToViewRenderer(ViewPtr view)
{
view->getRenderer()->AddActor(mActor);
if (mViewportListener)
mViewportListener->startListen(view->getRenderer());
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:10,代码来源:cxFiberBundleRep.cpp
示例2: MqoDisplayContext
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;
}
开发者ID:CueMol,项目名称:cuemol2,代码行数:57,代码来源:WbpSceneExporter.cpp
示例3: removeRepActorsFromViewRenderer
void VideoFixedPlaneRep::removeRepActorsFromViewRenderer(ViewPtr view)
{
mRenderer = vtkRendererPtr();
view->getRenderer()->RemoveActor(mRTGraphics->getActor());
view->getRenderer()->RemoveActor(mInfoText->getActor());
view->getRenderer()->RemoveActor(mStatusText->getActor());
view->getRenderer()->RemoveActor(mOrientationVText->getActor());
mProbeOrigin->setRenderer(NULL);
mProbeSector->setRenderer(NULL);
mProbeClipRect->setRenderer(NULL);
mViewportListener->stopListen();
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:13,代码来源:cxVideoRep.cpp
示例4: removeRepActorsFromViewRenderer
/**
* Removes rep assigned actors from the rendering pipeline
*/
void FiberBundleRep::removeRepActorsFromViewRenderer(ViewPtr view)
{
view->getRenderer()->RemoveActor(mActor);
if (mViewportListener)
mViewportListener->stopListen();
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:10,代码来源:cxFiberBundleRep.cpp
示例5: addRepActorsToViewRenderer
void MetricNamesRep::addRepActorsToViewRenderer(ViewPtr view)
{
for(unsigned i =0; i<mDisplayText.size(); ++i)
{
mDisplayText[i]->setRenderer(view->getRenderer());
}
}
开发者ID:normit-nav,项目名称:CustusX,代码行数:7,代码来源:cxMetricNamesRep.cpp
示例6: removeRepActorsFromViewRenderer
void PickerRep::removeRepActorsFromViewRenderer(ViewPtr view)
{
if (view == NULL)
return;
this->disconnectInteractor();
mViewportListener->stopListen();
mGraphicalPoint.reset();
if (mGlyphRep)
view->removeRep(mGlyphRep);
}
开发者ID:normit-nav,项目名称:CustusX,代码行数:12,代码来源:cxPickerRep.cpp
示例7: getPosition
QPoint LayoutWidgetUsingViewWidgets::getPosition(ViewPtr view)
{
ViewWidget* widget = this->WidgetFromView(view);
if (!widget)
{
CX_LOG_ERROR() << "Did not find view in layout " << view->getUid();
return QPoint(0,0);
}
QPoint p = widget->mapToGlobal(QPoint(0,0));
p = this->mapFromGlobal(p);
return p;
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:13,代码来源:cxViewCollectionWidgetUsingViewWidgets.cpp
示例8: addRepActorsToViewRenderer
void VideoFixedPlaneRep::addRepActorsToViewRenderer(ViewPtr view)
{
mRenderer = view->getRenderer();
mViewportListener->startListen(mRenderer);
view->getRenderer()->AddActor(mRTGraphics->getActor());
view->getRenderer()->AddActor(mInfoText->getActor());
view->getRenderer()->AddActor(mStatusText->getActor());
view->getRenderer()->AddActor(mOrientationVText->getActor());
mProbeClipRect->setRenderer(view->getRenderer());
mProbeOrigin->setRenderer(view->getRenderer());
mProbeSector->setRenderer(view->getRenderer());
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:14,代码来源:cxVideoRep.cpp
示例9: main
int main(int argc, char ** argv) {
// Create a MarbleBar Kernel
KernelPtr kernel = createKernel( defaultConfig() );
// Create our first view, titled 'Primary'
ViewPtr view = kernel->createView( "Primary" );
// Create a couple of properties
PStringPtr p1 = view->addProperty( make_shared<PString>("Iterations", "value") );
PStringPtr p2 = view->addProperty( make_shared<PString>("Second Value", "value") );
PBoolPtr p3 = view->addProperty( make_shared<PBool>("Toggler", false) );
PIntPtr p4 = view->addProperty( make_shared<PInt>("Range", 0) );
PImagePtr p5 = view->addProperty( make_shared<PImage>("Preview", 128, -1, "about:blank") );
// Most of the properies offer overloads that behave like
// a regular underlaying variable (ex. int, bool, string).
//
// Changes to these properties are instantly reflected in the UI
// and likewise, changes in the UI instantly affect the value of
// the properties.
//
*p1 = "test";
*p1 += "ing";
// Ask kernel to open the GUI (open system's web browser)
kernel->openGUI();
// Start kerne's invinite loop
while (true) {
// .. Do your single-threaded work here ..
// Just remember to let kernel process it's I/O
kernel->poll();
}
// Optionally you might wish to start the kernel thread
// in a different thread, and to run it's start() method
kernel->start();
return 0;
};
开发者ID:wavesoft,项目名称:marblebar,代码行数:43,代码来源:example.cpp
示例10: removeRepActorsFromViewRenderer
void VolumetricRep::removeRepActorsFromViewRenderer(ViewPtr view)
{
view->getRenderer()->RemoveVolume(mVolume);
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:4,代码来源:cxVolumetricRep.cpp
示例11:
void GeometricRep2D::addRepActorsToViewRenderer(ViewPtr view)
{
view->getRenderer()->AddActor(mActor);
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:4,代码来源:cxGeometricRep2D.cpp
示例12: removeRepActorsFromViewRenderer
void OrientationAnnotationSmartRep::removeRepActorsFromViewRenderer(ViewPtr view)
{
view->getRenderer()->RemoveActor(mOrientation);
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:4,代码来源:cxOrientationAnnotation2DRep.cpp
示例13: addRepActorsToViewRenderer
void PlaneMetricRep::addRepActorsToViewRenderer(ViewPtr view)
{
mViewportListener->startListen(view->getRenderer());
DataMetricRep::addRepActorsToViewRenderer(view);
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:5,代码来源:cxPlaneMetricRep.cpp
示例14:
void PointMetricRep2D::addRepActorsToViewRenderer(ViewPtr view)
{
if (mViewportListener)
mViewportListener->startListen(view->getRenderer());
DataMetricRep::addRepActorsToViewRenderer(view);
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:6,代码来源:cxPointMetricRep2D.cpp
示例15: PovDisplayContext
void PovSceneExporter::write()
{
PovDisplayContext *ppovdc = MB_NEW PovDisplayContext();
LString str_povpath = getPath();
LString str_incpath = getPath("inc");
// Check and mangle the path names
if (m_bMakeRelIncPath) {
if (!str_povpath.isEmpty() && !str_incpath.isEmpty()) {
// Check and modify the main pov file path
fs::path povpath(str_povpath);
if (!povpath.is_complete()) {
#if (BOOST_FILESYSTEM_VERSION==2)
povpath = fs::complete(povpath);
setPath(povpath.file_string());
#else
povpath = fs::absolute(povpath);
setPath(povpath.string());
#endif
}
fs::path base_path = povpath.parent_path();
// Check and modify the inc file path
fs::path incpath(str_incpath);
if (!incpath.is_complete()) {
ppovdc->setIncFileName(str_incpath);
#if (BOOST_FILESYSTEM_VERSION==2)
incpath = fs::complete(incpath, base_path);
setPath("inc", incpath.file_string());
#else
incpath = fs::absolute(incpath, base_path);
setPath("inc", incpath.string());
#endif
}
else {
// make the inc-file path relative
#if (BOOST_FILESYSTEM_VERSION==2)
LString relpath = qlib::makeRelativePath(str_incpath, base_path.directory_string());
#else
LString relpath = qlib::makeRelativePath(str_incpath, base_path.string());
#endif
ppovdc->setIncFileName(relpath);
}
}
}
else {
ppovdc->setIncFileName(str_incpath);
}
// Main stream
qlib::OutStream *pOutPov = createOutStream();
// Sub stream (inc file)
qlib::OutStream *pOutInc = createOutStream("inc");
ScenePtr pScene = getClient();
CameraPtr pCam = getCamera();
qlib::ensureNotNull(pCam.get());
// ppovdc->setTargetView(pView);
ppovdc->init(pOutPov, pOutInc);
//ppovdc->startPovRender();
ppovdc->setClipZ(m_bUseClipZ);
ppovdc->setPostBlend(m_bPostBlend);
ppovdc->setPerspective(m_bPerspective);
ppovdc->setBgColor(pScene->getBgColor());
ppovdc->enableEdgeLines(m_bEnableEdgeLines);
ppovdc->setCreaseLimit(m_dCreaseLimit);
ppovdc->setEdgeRise(m_dEdgeRise);
const double zoom = pCam->getZoom();
ppovdc->setZoom(zoom);
ppovdc->setSlabDepth(pCam->getSlabDepth());
ppovdc->setViewDist(pCam->getCamDist());
ppovdc->loadIdent();
ppovdc->rotate(pCam->m_rotQuat);
ppovdc->translate(-(pCam->m_center));
// calc line width factor
int height = getHeight();
if (height<=0 && pScene->getViewCount()>0) {
ViewPtr pView = pScene->beginView()->second;
double hpix = pView->getHeight();
ppovdc->setLineScale(zoom/hpix);
}
else {
MB_DPRINTLN("POV> hint image height=%d", height);
const double fac = zoom/( double(height)*1.5 );
MB_DPRINTLN("POV> line scale factor=%f", fac);
ppovdc->setLineScale(fac);
}
pScene->display(ppovdc);
m_strBlendTab = ppovdc->getPostBlendTableJSON();
//ppovdc->endPovRender();
//.........这里部分代码省略.........
开发者ID:biochem-fan,项目名称:cuemol2,代码行数:101,代码来源:PovSceneExporter.cpp
示例16:
bool operator==(const UniquePtr<T>& lhs, const ViewPtr<U>& rhs) noexcept
{
return lhs.get() == rhs.get();
}
开发者ID:GeorgievLab,项目名称:CeCe-core,代码行数:4,代码来源:ViewPtr.hpp
示例17: addRepActorsToViewRenderer
void VolumetricRep::addRepActorsToViewRenderer(ViewPtr view)
{
view->getRenderer()->AddVolume(mVolume);
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:4,代码来源:cxVolumetricRep.cpp
示例18: addRepActorsToViewRenderer
void OrientationAnnotationSmartRep::addRepActorsToViewRenderer(ViewPtr view)
{
this->transformChangedSlot();
view->getRenderer()->AddActor(mOrientation);
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:5,代码来源:cxOrientationAnnotation2DRep.cpp
示例19:
void Slices3DRep::removeRepActorsFromViewRenderer(ViewPtr view)
{
for (unsigned i=0; i<mProxy.size(); ++i)
view->getRenderer()->RemoveActor(mProxy[i]->getActor());
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:5,代码来源:cxSlices3DRep.cpp
示例20: 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;
}
开发者ID:zznq,项目名称:foto-boof,代码行数:49,代码来源:ViewFactory.cpp
注:本文中的ViewPtr类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论