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

基于php网站开发步骤网络推广公司专业网络

基于php网站开发步骤,网络推广公司专业网络,学做ps的软件的网站有哪些,四大工业设计软件有哪些一、实现效果 二、实现原理 输入四个坐标点,第一个点为中心点,第二三四个点分别以中心点与地面垂线所在线上的各自高度水平面的交点为圆心旋转360进行圆形区域绘制,然后将三个不同高度上的圆形区域进行结合形成三维覆盖区域的轮廓面。 三、参…

一、实现效果
在这里插入图片描述
二、实现原理
输入四个坐标点,第一个点为中心点,第二三四个点分别以中心点与地面垂线所在线上的各自高度水平面的交点为圆心旋转360°进行圆形区域绘制,然后将三个不同高度上的圆形区域进行结合形成三维覆盖区域的轮廓面。
三、参考代码

void GlobeWidget::draw3dCoverageRegion(const osg::ref_ptr<osg::Vec3Array>& points)
{if (!points || points->size() < 4)return;const osg::Vec3d& centerGeo = (*points)[0];osgEarth::GeoPoint geoCenter(osgEarth::SpatialReference::get("wgs84"),centerGeo.x(), centerGeo.y(), centerGeo.z(),osgEarth::ALTMODE_ABSOLUTE);osg::Vec3d centerWorld;geoCenter.toWorld(centerWorld);osg::Vec3d axis = centerWorld;axis.normalize();// === 圆形 ===const int segments = 60;  // 保证每个圆的分段数量一致std::vector<osg::ref_ptr<osg::Vec3Array>> circles;std::vector<int> layerOffsets;int vertexOffset = 0;// 绘制每个圆for (int i = 1; i <= 3; ++i){const osg::Vec3d& ptGeo = (*points)[i];osgEarth::GeoPoint geoPt(osgEarth::SpatialReference::get("wgs84"),ptGeo.x(), ptGeo.y(), ptGeo.z(),osgEarth::ALTMODE_ABSOLUTE);osg::Vec3d ptWorld;geoPt.toWorld(ptWorld);osg::Vec3d radiusVec = ptWorld - centerWorld;osg::ref_ptr<osg::Vec3Array> circlePts = new osg::Vec3Array();// 使用相同的分段数,避免缺口for (int j = 0; j < segments; ++j){double angle = osg::DegreesToRadians(360.0 * j / segments);osg::Matrixd rot = osg::Matrixd::rotate(angle, axis);osg::Vec3d rotated = radiusVec * rot;circlePts->push_back(centerWorld + rotated);}// 绘制当前圆osg::ref_ptr<osg::Geometry> circleGeom = new osg::Geometry();circleGeom->setVertexArray(circlePts);circleGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINE_LOOP, 0, circlePts->size()));osg::ref_ptr<osg::Vec4Array> circleColor = new osg::Vec4Array();circleColor->push_back(osg::Vec4(0.0, 1.0, 0.0, 1.0));circleGeom->setColorArray(circleColor, osg::Array::BIND_OVERALL);osg::ref_ptr<osg::Geode> circleGeode = new osg::Geode();circleGeode->addDrawable(circleGeom);m_userDrawGroup->addChild(circleGeode);circles.push_back(circlePts);layerOffsets.push_back(vertexOffset);vertexOffset += circlePts->size();}// === 轮廓面 ===osg::ref_ptr<osg::Vec3Array> meshVerts = new osg::Vec3Array();osg::ref_ptr<osg::DrawElementsUInt> meshIndices = new osg::DrawElementsUInt(GL_TRIANGLES);// 合并所有圆的顶点for (auto& c : circles){for (auto& pt : *c)meshVerts->push_back(pt);}// 连接每一层圆之间的三角形for (size_t i = 0; i < circles.size() - 1; ++i){const int offset0 = layerOffsets[i];const int offset1 = layerOffsets[i + 1];// 确保每层圆的点数一致const int count = segments;for (int j = 0; j < count - 1; ++j){// 创建三角形meshIndices->push_back(offset0 + j);meshIndices->push_back(offset1 + j);meshIndices->push_back(offset0 + j + 1);meshIndices->push_back(offset0 + j + 1);meshIndices->push_back(offset1 + j);meshIndices->push_back(offset1 + j + 1);}// 最后一个三角形:补全圆的缺口meshIndices->push_back(offset0 + count - 1);meshIndices->push_back(offset1 + count - 1);meshIndices->push_back(offset0);meshIndices->push_back(offset0);meshIndices->push_back(offset1 + count - 1);meshIndices->push_back(offset1);}osg::ref_ptr<osg::Geometry> meshGeom = new osg::Geometry();meshGeom->setVertexArray(meshVerts);meshGeom->addPrimitiveSet(meshIndices);osg::ref_ptr<osg::Vec4Array> meshColor = new osg::Vec4Array();meshColor->push_back(osg::Vec4(1.0, 1.0, 0.0, 0.4));  // 半透明黄色meshGeom->setColorArray(meshColor, osg::Array::BIND_OVERALL);meshGeom->getOrCreateStateSet()->setMode(GL_BLEND, osg::StateAttribute::ON);meshGeom->getOrCreateStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);meshGeom->getOrCreateStateSet()->setMode(GL_CULL_FACE, osg::StateAttribute::OFF);osg::ref_ptr<osg::Geode> meshGeode = new osg::Geode();meshGeode->addDrawable(meshGeom);m_userDrawGroup->addChild(meshGeode);// === 视角聚焦 ===if (m_osgWidget && m_osgWidget->getOsgViewer()){osgViewer::Viewer* viewer = m_osgWidget->getOsgViewer();osgEarth::Util::EarthManipulator* manip =dynamic_cast<osgEarth::Util::EarthManipulator*>(viewer->getCameraManipulator());if (manip){osgEarth::Viewpoint vp("Focus", centerGeo.x(), centerGeo.y(), centerGeo.z() + 300,0.0, -90.0, 1500.0);manip->setViewpoint(vp, 2.0);}}
}
http://www.dtcms.com/wzjs/277502.html

相关文章:

  • 南京cms建站系统上海短视频推广
  • 企业建站公司方案河南网站推广那家好
  • 国内自建的海淘网站seo资源
  • 怎么用php做网站搜索引擎关键词排名
  • 无锡电子商务网站建设公司seo网络推广公司
  • 大题小做网站无代码网站开发平台
  • 南昌定制网站公司推广策划
  • 制作旅游网站简单广州seo优化电话
  • 网站界面设计的步骤东莞网站制作外包
  • 大石桥网站webview播放视频
  • 网站建设方案书 内容管理制度广州网络推广服务商
  • 如何在淘宝上接单网站建设seo推广优化方案
  • 门户app网站建设多少钱志鸿优化设计电子版
  • html5做网站优势优化网站关键词排名软件
  • 宁波公司核名网站网络营销公司排行
  • 南京做网站优化哪家好国内疫情最新情况
  • 网站维护有哪些企业百度竞价培训
  • 企业注册地址查询河北百度seo关键词排名
  • 网站算信息化建设百度招聘
  • 关于建设集团公司网站的报告核心关键词和长尾关键词举例
  • 学校网站框架怎么把产品快速宣传并推广
  • 做网站公司关键词怎样推广公司的网站
  • 建设黄色网站自己看百度在线扫一扫
  • 网站建设导航栏网页制作成品模板网站
  • 摄影后期教程网站百度推广创意范例
  • 做的网站为什么图片看不了怀化网络推广
  • 7天精通网站建设实录培训机构营业执照如何办理
  • 网站建设需求方案网站alexa排名
  • 深圳市手机网站建设怎么样福州seo排名公司
  • 长治市建设厅官方网站济南网络推广网络营销