当前位置: 首页 > wzjs >正文

网站开发和网站建设利用搜索引擎营销成功的案例

网站开发和网站建设,利用搜索引擎营销成功的案例,怎样做网站静态,专做专业课视频的网站类名作用Qt3DWindow3D渲染窗口容器QEntity场景中的实体(对象或容器)QCamera控制观察视角QPointLight点光源QConeMesh圆锥几何网格QTransform控制实体的位置/旋转/缩放QPhongMaterialPhong光照材质(定义颜色、反光等)QFirstPersonC…
类名作用
Qt3DWindow3D渲染窗口容器
QEntity场景中的实体(对象或容器)
QCamera控制观察视角
QPointLight点光源
QConeMesh圆锥几何网格
QTransform控制实体的位置/旋转/缩放
QPhongMaterialPhong光照材质(定义颜色、反光等)
QFirstPersonCameraController第一人称相机控制器(WASD+鼠标控制)

Qt3DWindow(3D 窗口)

├─ RootEntity (QEntity 根实体)
│   ├─ Camera (QCamera 相机)
│   │   ├─ Lens (镜头:透视投影参数)
│   │   └─ Controller (控制器:WASD+鼠标控制)
│   │
│   ├─ Light (光源)
│   │   ├─ QPointLight(点光源:颜色/强度)
│   │   └─ QTransform (变换:光源位置)

│   │
│   └─ Cone (3d 圆锥实体)

│       ├─ QConeMesh (网格:几何图形)

│       ├─ QPhongMaterial (材质:颜色/反光)
│       └─ QTransform (变换:位置/旋转)

│   
└─ FrameGraph (渲染管线:背景色/渲染设置)

//#include "mainwindow.h"//#include "FrustumWidget.h"
#include <QApplication>
#include <QtCore/QObject>
#include <QGuiApplication>#include <Qt3DRender/qcamera.h>
#include <Qt3DCore/qentity.h>
#include <Qt3DRender/qcameralens.h>#include <QtWidgets/QApplication>
#include <QtWidgets/QWidget>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QCommandLinkButton>
#include <QtGui/QScreen>#include <Qt3DInput/QInputAspect>#include <Qt3DExtras/qtorusmesh.h>
#include <Qt3DRender/qmesh.h>
#include <Qt3DRender/qtechnique.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qeffect.h>
#include <Qt3DRender/qtexture.h>
#include <Qt3DRender/qrenderpass.h>
#include <Qt3DRender/qsceneloader.h>
#include <Qt3DRender/qpointlight.h>#include <Qt3DCore/qtransform.h>
#include <Qt3DCore/qaspectengine.h>#include <Qt3DRender/qrenderaspect.h>
#include <Qt3DExtras/qforwardrenderer.h>#include <Qt3DExtras/qt3dwindow.h>
#include <Qt3DExtras/qfirstpersoncameracontroller.h>
#include <Qt3DExtras/QPhongMaterial>
#include <Qt3DExtras/QConeMesh>
#include <QText2DEntity>
// 创建坐标轴线
Qt3DCore::QEntity* createAxisLine(Qt3DCore::QEntity* parent,const QVector3D& start,const QVector3D& end,const QColor& color) {Qt3DCore::QEntity* axis = new Qt3DCore::QEntity(parent);// 顶点数据QByteArray vertexData;vertexData.resize(2 * 3 * sizeof(float)); // 2 points xyzfloat* ptr = reinterpret_cast<float*>(vertexData.data());*ptr++ = start.x(); *ptr++ = start.y(); *ptr++ = start.z();*ptr++ = end.x();   *ptr++ = end.y();   *ptr++ = end.z();// 几何体Qt3DCore::QGeometry* geometry = new Qt3DCore::QGeometry(axis);Qt3DCore::QBuffer* vertexBuffer = new Qt3DCore::QBuffer(geometry);vertexBuffer->setData(vertexData);Qt3DCore::QAttribute* positionAttr = new Qt3DCore::QAttribute(vertexBuffer,  // 直接传递缓冲区,不传递geometryQt3DCore::QAttribute::defaultPositionAttributeName(),Qt3DCore::QAttribute::Float,3,  // 每个顶点的分量数(xyz=3)2   // 顶点数量(起点+终点=2));geometry->addAttribute(positionAttr);  // 手动添加到geometry// 渲染器Qt3DRender::QGeometryRenderer* line = new Qt3DRender::QGeometryRenderer(axis);line->setGeometry(geometry);line->setPrimitiveType(Qt3DRender::QGeometryRenderer::Lines);// 材质Qt3DExtras::QPhongMaterial* material = new Qt3DExtras::QPhongMaterial(axis);material->setDiffuse(color);material->setAmbient(color);axis->addComponent(line);axis->addComponent(material);return axis;
}// 添加坐标轴标签(需要Qt3DExtras模块)
void addAxisLabel(Qt3DCore::QEntity* parent,const QString& text,const QVector3D& position) {Qt3DExtras::QText2DEntity* label = new Qt3DExtras::QText2DEntity(parent);label->setText(text);label->setColor(Qt::black);label->setHeight(20);label->setWidth(30);Qt3DCore::QTransform* transform = new Qt3DCore::QTransform(label);transform->setTranslation(position);label->addComponent(transform);
}
int main(int argc, char *argv[])
{QApplication a(argc, argv);//MainWindow w;//w.show();Qt3DExtras::Qt3DWindow *view = new Qt3DExtras::Qt3DWindow();//3D的渲染窗口,提供3D场景的显示容器view->defaultFrameGraph()->setClearColor(QColor(Qt::black));//设置视图背景色QWidget *widget = QWidget::createWindowContainer(view);QSize screenSize = view->screen()->size();widget->setMinimumSize(QSize(200, 100));widget->setMaximumSize(screenSize);widget->setWindowTitle(QStringLiteral("Basic shapes"));//3D中的基本实体类,代表场景中的一个对象或容器。Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity();view->setRootEntity(rootEntity);//管理输入设备的抽象层,启用输入处理(如鼠标、键盘事件)Qt3DInput::QInputAspect *input = new Qt3DInput::QInputAspect;view->registerAspect(input);//控制3D场景的观察视角Qt3DRender::QCamera *cameraEntity = view->camera();cameraEntity->lens()->setPerspectiveProjection(45.0f, 16.0f / 9.0f, 0.1f, 1000.0f);cameraEntity->setUpVector(QVector3D(0, 1, 0));//定义相机的“向上”方向(通常为Y轴 (0,1,0))。cameraEntity->setPosition(QVector3D(0, 10.0f, 10.0f));//视点:观察者所处的位置。cameraEntity->setViewCenter(QVector3D(0, 0, 0));//观察目标点//高光控制Qt3DCore::QEntity *lightEntity = new Qt3DCore::QEntity(rootEntity);//点光源组件Qt3DRender::QPointLight *light = new Qt3DRender::QPointLight(lightEntity);light->setColor("white");light->setIntensity(1);lightEntity->addComponent(light);//定义3d实体的位置/旋转/缩放Qt3DCore::QTransform *lightTransform = new Qt3DCore::QTransform(lightEntity);lightTransform->setTranslation(cameraEntity->position());lightEntity->addComponent(lightTransform);//启用第一人称相机控制(通过WASD和鼠标移动相机)Qt3DExtras::QFirstPersonCameraController *camController = new Qt3DExtras::QFirstPersonCameraController(rootEntity);camController->setCamera(cameraEntity);// 第一个圆锥(底部圆锥)Qt3DCore::QEntity *m_coneEntity = new Qt3DCore::QEntity(rootEntity);Qt3DExtras::QConeMesh *cone = new Qt3DExtras::QConeMesh();cone->setTopRadius(0.5);cone->setBottomRadius(0.5);cone->setLength(1);  // 高度为1cone->setRings(50);cone->setSlices(20);Qt3DCore::QTransform *coneTransform = new Qt3DCore::QTransform();coneTransform->setScale(1.0);//coneTransform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1.0f, 0.0f, 0.0f), 45.0f));coneTransform->setTranslation(QVector3D(0.0f, 0.0f, 0.0f));  // 底部圆锥位于原点Qt3DExtras::QPhongMaterial *coneMaterial = new Qt3DExtras::QPhongMaterial();coneMaterial->setDiffuse(QColor(Qt::white));m_coneEntity->addComponent(cone);m_coneEntity->addComponent(coneMaterial);m_coneEntity->addComponent(coneTransform);// 第二个圆锥(顶部圆锥)Qt3DCore::QEntity *m_coneEntity1 = new Qt3DCore::QEntity(rootEntity);Qt3DExtras::QConeMesh *cone1 = new Qt3DExtras::QConeMesh();cone1->setTopRadius(0.5);cone1->setBottomRadius(0.5);cone1->setLength(1);  // 高度同样为1cone1->setRings(50);cone1->setSlices(20);Qt3DCore::QTransform *coneTransform1 = new Qt3DCore::QTransform();coneTransform1->setScale(1.0);//coneTransform1->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1.0f, 0.0f, 0.0f), 45.0f));// 将第二个圆锥放在第一个圆锥的顶部// Y轴偏移 = 第一个圆锥的高度 + 第二个圆锥高度的一半(因为旋转后中心点在几何中心)coneTransform1->setTranslation(QVector3D(0.0f, 1.0f, 0.0f));Qt3DExtras::QPhongMaterial *coneMaterial1 = new Qt3DExtras::QPhongMaterial();coneMaterial1->setDiffuse(QColor(Qt::white));m_coneEntity1->addComponent(cone1);m_coneEntity1->addComponent(coneMaterial1);m_coneEntity1->addComponent(coneTransform1);widget->show();widget->resize(500, 500);return a.exec();
}

 

http://www.dtcms.com/wzjs/223722.html

相关文章:

  • 网站的站内结构锚文本是如何做的什么关键词可以搜到那种
  • 网站基础功能快手秒赞秒评网站推广
  • 金融企业网站模板个人开发app可以上架吗
  • 怎么在静态网站基础上加动态百度一下你就知道搜索
  • 毕节市网站建设搜索引擎优化案例
  • 织梦网站管理系统百度注册新账号
  • 做ip资讯的网站百度图片搜索图片识别
  • 手机企业网站源码网站运营和维护
  • 网站规划建设与管理维护网站优化方式有哪些
  • 高端品牌包包seo关键词推广优化
  • wordpress和discuz结合seo内链优化
  • 华艺网站开发电话营销销售系统
  • b2b网站开发费用推广网络推广
  • 景点网站应该怎么做海豹直播nba
  • 2023年推广网站百度推广效果怎么样
  • 唐山有制作网站的没冯宗耀seo教程
  • 做微商进哪个网站安全短期培训学什么好
  • 企业网站系统建设毕业论文百度知道在线
  • o2o商城上的二级网站百度搜索引擎网站
  • 烟台市建委网站适合奖励自己的网站免费
  • 刚成立公司如何做网站百度推广培训机构
  • 东莞长安做网站seo需要掌握什么技能
  • WordPress 3.5火车头发布接口seo网站关键词优化哪家好
  • 青岛做网站建设河北seo网络推广
  • 做垃圾网站赚钱网店营销策略有哪些
  • 门户网站需要多少费用国内做网站的公司
  • 人人装修网网络营销优化
  • 网站开发源代码mvc百度招聘2022年最新招聘
  • 深圳最好的网站开发公司如何进行网站的推广
  • 我想来做外贸网站来推广百度指数首页