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

wordpress 友荐搜索引擎优化方法包括

wordpress 友荐,搜索引擎优化方法包括,威海建设委员会网站,东营建设局官网程序示例精选 COpenGL三维显示镜面反射光线漫反射实例 如需安装运行环境或远程调试,见文章底部个人QQ名片,由专业技术人员远程协助! 前言 这篇博客针对《COpenGL三维显示镜面反射光线漫反射实例》编写代码,代码整洁,…

程序示例精选
C++OpenGL三维显示镜面反射光线漫反射实例
如需安装运行环境或远程调试,见文章底部个人QQ名片,由专业技术人员远程协助!

前言

这篇博客针对《C++OpenGL三维显示镜面反射光线漫反射实例》编写代码,代码整洁,规则,易读。 学习与应用推荐首选。


运行结果


文章目录

一、所需工具软件
二、使用步骤
       1. 主要代码
       2. 运行结果
三、在线协助

一、所需工具软件

       1. Python
       2. Pycharm

二、使用步骤

代码如下(示例):
void init() {glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);glutInitWindowSize(500, 500);glutCreateWindow("ObjLoader");glEnable(GL_DEPTH_TEST);//glDisable(GL_DEPTH_TEST);glShadeModel(GL_SMOOTH); setLightRes();glEnable(GL_DEPTH_TEST);// objModel.Init();glDepthFunc(GL_LEQUAL); // 设置深度测试函数
}void display() {glColor3f(1.0, 1.0, 1.0);glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);glMatrixMode(GL_MODELVIEW);glLoadIdentity();// 应用平移和缩放glTranslatef(transX, transY, -270.0f); // 应用水平和垂直平移141.0fglScalef(zoomFactor, zoomFactor, zoomFactor); // 应用缩放setLightRes();glPushMatrix();// 更新gluLookAt以使用vertDegree进行垂直旋转float vertRad = c * vertDegree; // 将vertDegree转换为弧度gluLookAt(r * cos(c * degree) * cos(vertRad), r * sin(vertRad), r * sin(c * degree) * cos(vertRad),0.0f, 0.0f, 0.0f,0.0f, 1.0f, 0.0f);// 根据计算出的中心坐标平移模型glTranslatef(-objModel.center[0], -objModel.center[1], -objModel.center[2]);objModel.Draw();glPopMatrix();glutSwapBuffers();
}void reshape(int width, int height) {glViewport(0, 0, width, height);glMatrixMode(GL_PROJECTION);glLoadIdentity();gluPerspective(60.0f, (GLdouble)width / (GLdouble)height, 1.0f, 200.0f);glMatrixMode(GL_MODELVIEW);
}// 在全局范围内定义一个变量来追踪当前鼠标操作
enum MouseAction { NONE, ROTATE, TRANSLATE };
MouseAction currentAction = NONE;void mouseButton(int button, int state, int x, int y) {if (state == GLUT_DOWN) {if (button == GLUT_LEFT_BUTTON) {currentAction = ROTATE;oldPosX = x;oldPosY = y;}else if (button == GLUT_RIGHT_BUTTON) {currentAction = TRANSLATE;oldRightPosX = x;oldRightPosY = y;}}else if (state == GLUT_UP) {currentAction = NONE;}
}void mouseMove(int x, int y) {if (currentAction == ROTATE) {int deltaX = x - oldPosX;int deltaY = y - oldPosY;degree += deltaX;vertDegree += deltaY;oldPosX = x;oldPosY = y;}else if (currentAction == TRANSLATE) {transX += (x - oldRightPosX) * 0.01f;transY -= (y - oldRightPosY) * 0.01f;oldRightPosX = x;oldRightPosY = y;}glutPostRedisplay();
}//滚轮没反应
void mouseWheel(int wheel, int direction, int x, int y) //
{cout << "test " << endl;cout << "Mouse wheel event detected. Direction: " << direction << endl;if (direction > 0) {zoomFactor += 0.1f; // 增加缩放因子}else {zoomFactor -= 0.1f; // 减小缩放因子}// 防止缩放因子小于等于0if (zoomFactor <= 0.1f) {zoomFactor = 0.1f;}glutPostRedisplay();
}void processNormalKeys(unsigned char key, int x, int y) {switch (key) {case 'w': // Pressing "w" key, zoom incout << "Zoom factor increased by 0.1\n"; zoomFactor += 0.1f;break;case 's': // Pressing "s" key, zoom outzoomFactor -= 0.1f;if (zoomFactor <= 0.1f) {zoomFactor = 0.1f; // Prevent zoomFactor from going below 0.1}break;case 27: // Pressing the Esc key (ASCII value 27) to exit the programexit(0);break;// Add more cases for handling other keys as needed}glutPostRedisplay();
}void specialKeys(int key, int x, int y) {switch (key) {case GLUT_KEY_UP:// 按下上方向键,进行相应操作break;case GLUT_KEY_DOWN:// 按下下方向键,进行相应操作break;}glutPostRedisplay();
}void myIdle() {glutPostRedisplay();
}int main(int argc, char* argv[]) {glutInit(&argc, argv);init();glutDisplayFunc(display);glutReshapeFunc(reshape);glutMouseFunc(mouseButton);glutMotionFunc(mouseMove);glutMouseWheelFunc(mouseWheel);glutKeyboardFunc(processNormalKeys);     // 处理一般的键盘事件glutSpecialFunc(specialKeys);  // 处理特殊键盘事件glutIdleFunc(myIdle);// 在此处调用 CalculateCenter() 函数objModel.CalculateCenter();// 打印模型的中心坐标objModel.PrintCenter();// 计算并打印模型长宽高objModel.CalculateBoundingBox();objModel.PrintBoundingBox();glutMainLoop();return 0;
}
运行结果

三、在线协助:

如需安装运行环境或远程调试,见文章底部个人 QQ 名片,由专业技术人员远程协助!

1)远程安装运行环境,代码调试
2)Visual Studio, Qt, C++, Python编程语言入门指导
3)界面美化
4)软件制作
5)云服务器申请
6)网站制作

当前文章连接:https://blog.csdn.net/alicema1111/article/details/132666851
个人博客主页:https://blog.csdn.net/alicema1111?type=blog
博主所有文章点这里:https://blog.csdn.net/alicema1111?type=blog

博主推荐:
Python人脸识别考勤打卡系统:
https://blog.csdn.net/alicema1111/article/details/133434445
Python果树水果识别:https://blog.csdn.net/alicema1111/article/details/130862842
Python+Yolov8+Deepsort入口人流量统计:https://blog.csdn.net/alicema1111/article/details/130454430
Python+Qt人脸识别门禁管理系统:https://blog.csdn.net/alicema1111/article/details/130353433
Python+Qt指纹录入识别考勤系统:https://blog.csdn.net/alicema1111/article/details/129338432
Python Yolov5火焰烟雾识别源码分享:https://blog.csdn.net/alicema1111/article/details/128420453
Python+Yolov8路面桥梁墙体裂缝识别:https://blog.csdn.net/alicema1111/article/details/133434445
Python+Yolov5道路障碍物识别:https://blog.csdn.net/alicema1111/article/details/129589741
Python+Yolov5跌倒检测 摔倒检测 人物目标行为 人体特征识别:https://blog.csdn.net/alicema1111/article/details/129272048

http://www.mnyf.cn/news/50564.html

相关文章:

  • 晋中网站建设公司百度免费建网站
  • 网站客服图标大连企业网站建站模板
  • 临邑建设局网站seo规范培训
  • 法律问题咨询哪个网站做的好seo网站推广案例
  • 网站访问量大打不开网络营销七个步骤
  • 房产网站案例企业网站优化技巧
  • 番禺是哪里不错宁波seo公司
  • 企业网站建设一条seo快速排名上首页
  • 网站开发 架构设计seo网站推广价格
  • 做本地的门户网站百度竞价关键词价格查询
  • 福州网站建设免费咨询刷排名的软件是什么
  • 白云区江夏附近做网站排名前50名免费的网站
  • 手机建设网站自适应的好处自己的产品怎么推广
  • 曲阳网站建设推广播放量自助下单平台
  • 网站如何做才能被360收录seo关键词优化系统
  • 网站备案管理系统网站百度关键词搜索技巧
  • 商务网站建设策划书html制作网站
  • 泰安营销型网站公司数字化营销怎么做
  • 重庆外贸网站建设公司自己创建网站
  • 西城建设委员会的网站发帖推广
  • 深圳市品牌策划公司佛山旺道seo
  • 大兴快速网站建设哪家好制作网站的基本流程
  • 企业网站banner大图百度网盘下载速度
  • 哪里有做网站优化的公司成人培训班有哪些课程
  • 湖州做网站优化seo案例分析100例
  • 太原有做网站的吗营销新闻
  • 成都彩蝶花卉网站建设案例百度推广账号怎么注册
  • 网站建设 推神网络seo关键词快速排名介绍
  • 济南专业做网站公司哪家好免费网站制作app
  • 网站突然不被百度收录天津百度seo代理