Q3DSeries初始化

m_graph3dCurve = new Q3DScatter();
m_graph3dCurve->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetBehindHigh);

m_graph3dCurve->setShadowQuality(QAbstract3DGraph::ShadowQualityNone);
m_graph3dCurve->axisX()->setRange(-20, 20);
m_graph3dCurve->axisY()->setRange(-20, 20);
m_graph3dCurve->axisZ()->setRange(-20, 20);

m_graph3dCurve->axisX()->setSegmentCount(20);
m_graph3dCurve->axisY()->setSegmentCount(20);
m_graph3dCurve->axisZ()->setSegmentCount(20);
m_graph3dCurve->activeTheme()->setType(Q3DTheme::ThemeQt);

m_graph3dCurve->axisX()->setTitle("X");
m_graph3dCurve->axisY()->setTitle("Y");
m_graph3dCurve->axisZ()->setTitle("Z");
m_graph3dCurve->activeTheme()->setLabelBackgroundEnabled(false);
m_3dSeries = new QScatter3DSeries;
m_3dSeries->setItemSize(0.1);
m_3dSeries->setBaseColor(QColor(0, 114, 182));
m_3dSeries->setMesh(QAbstract3DSeries::Mesh(4));

m_widget3dCurve = QWidget::createWindowContainer(m_graph3dCurve);
m_widget3dCurve->setWindowTitle("3dCurve");
m_graph3dCurve->addSeries(m_3dSeries);
发布了23 篇原创文章 · 获赞 0 · 访问量 4330
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览