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

杭州网站推广平台网站开发实训报告总结

杭州网站推广平台,网站开发实训报告总结,唐山网站排名推广,发稿是什么意思本文是介绍对寻路库recastnavigation 改造#xff0c;使得使用更加友好。 Git仓库: https://github.com/jiangguilong2000/recastnavigation 首先#xff0c;我们要做一些前置操作 SDL: 开放源代码的跨平台多媒体开发库 Premake#xff1a;量跨平台构建系统 环境: VS 2019…本文是介绍对寻路库recastnavigation 改造使得使用更加友好。 Git仓库: https://github.com/jiangguilong2000/recastnavigation 首先我们要做一些前置操作 SDL: 开放源代码的跨平台多媒体开发库 Premake量跨平台构建系统 环境: VS 2019以及完整的C编译环境 Rider For Unreal Engine 2022.2.1下面简称Rider Unity 2019.4.8 lts .Net Core 2.2 1.首先把git库拉到本地先将下载的SDL库放到ecastnavigation\RecastDemo\Contrib,需要改名为SDL应该得到如下目录recastnavigation-master\RecastDemo\Contrib\SDL\lib\x64 2/然后将下载premake5.exe放入 recastnavigation\RecastDemo 3.然后通过命令行控制premake编译recastnavigation为sln工程 PS E:\recastnavigation\RecastDemo .\premake5.exe vs2019 Building configurations... Running action vs2019... Generated Build/vs2019/recastnavigation.sln... Generated Build/vs2019/DebugUtils.vcxproj... Generated Build/vs2019/DebugUtils.vcxproj.filters... Generated Build/vs2019/Detour.vcxproj... Generated Build/vs2019/Detour.vcxproj.filters... Generated Build/vs2019/DetourCrowd.vcxproj... Generated Build/vs2019/DetourCrowd.vcxproj.filters... Generated Build/vs2019/DetourTileCache.vcxproj... Generated Build/vs2019/DetourTileCache.vcxproj.filters... Generated Build/vs2019/Recast.vcxproj... Generated Build/vs2019/Recast.vcxproj.filters... Generated Build/vs2019/RecastDemo.vcxproj... Generated Build/vs2019/RecastDemo.vcxproj.user... Generated Build/vs2019/RecastDemo.vcxproj.filters... Generated Build/vs2019/Tests.vcxproj... Generated Build/vs2019/Tests.vcxproj.user... Generated Build/vs2019/Tests.vcxproj.filters... Done (160ms).然后目录中会生成一个Build文件夹里面是我们编译出来的sln工程 recastnavigation\RecastDemo\Build\vs2019\recastnavigation.sln用rider打开直接运行我们就能看到编辑器画面了 接下去我们要对源码进行一些改造 原始的recast是没有开始点和结束点的坐标的那如何能显示出来呢 void NavMeshTesterTool::handleRenderOverlay(double* proj, double* model, int* view) {GLdouble x, y, z;char buf[64];// Draw start and end point labelsif (m_sposSet gluProject((GLdouble)m_spos[0], (GLdouble)m_spos[1], (GLdouble)m_spos[2],model, proj, view, x, y, z)){if (m_showCoord){snprintf(buf, sizeof(buf), Start (%.1f, %.1f, %.1f), m_spos[0], m_spos[1], m_spos[2]);imguiDrawText((int)x, (int)(y - 25), IMGUI_ALIGN_CENTER, buf, imguiRGBA(0, 0, 0, 220));}elseimguiDrawText((int)x, (int)(y - 25), IMGUI_ALIGN_CENTER, Start, imguiRGBA(0, 0, 0, 220));}if (m_toolMode TOOLMODE_RAYCAST m_hitResult m_showCoord gluProject((GLdouble)m_hitPos[0], (GLdouble)m_hitPos[1], (GLdouble)m_hitPos[2],model, proj, view, x, y, z)){snprintf(buf, sizeof(buf), HitPos (%.1f, %.1f, %.1f), m_hitPos[0], m_hitPos[1], m_hitPos[2]);imguiDrawText((int)x, (int)(y - 25), IMGUI_ALIGN_CENTER, buf, imguiRGBA(0, 0, 0, 220));}if (m_eposSet gluProject((GLdouble)m_epos[0], (GLdouble)m_epos[1], (GLdouble)m_epos[2],model, proj, view, x, y, z)){if (m_showCoord){float totalCost 0.0f;for (int i 0; i 1 m_nstraightPath; i)totalCost dtVdist(m_straightPath[i * 3], m_straightPath[(i 1) * 3]);snprintf(buf, sizeof(buf), End (%.1f, %.1f, %.1f), Cost %.1f, m_epos[0], m_epos[1], m_epos[2], totalCost);imguiDrawText((int)x, (int)(y - 25), IMGUI_ALIGN_CENTER, buf, imguiRGBA(0, 0, 0, 220));}elseimguiDrawText((int)x, (int)(y - 25), IMGUI_ALIGN_CENTER, End, imguiRGBA(0, 0, 0, 220));} }那么如何能显示出关键点point list?首先路径搜索的模式要改成TOOLMODE_PATHFIND_STRAIGHT模式代码需要增加如下的打印 在NavMeshTesterTool.cpp中增加 void NavMeshTesterTool::recalc(){ .... ....if (m_toolMode TOOLMODE_PATHFIND_STRAIGHT m_nstraightPath0) {stringstream os;os total point size m_nstraightPath ,;//m_sample-getContext()-log(RC_LOG_PROGRESS, total point size%d, m_nstraightPath);for (int i 0; i m_nstraightPath; i){if (i 0i%100) {m_sample-getContext()-log(RC_LOG_PROGRESS, %s, os.str().c_str());os.str();}os [ m_straightPath[i * 3] , m_straightPath[i * 3 1] , m_straightPath[i * 3 2] ] ;}m_sample-getContext()-log(RC_LOG_PROGRESS, %s, os.str().c_str());} }在Sample.h中增加 public:Sample();virtual ~Sample();void setContext(BuildContext* ctx) { m_ctx ctx; }BuildContext* getContext() {return m_ctx;}最后一个问题如何把显示日志的地方的文本能鼠标选中目前还没搞定
http://www.w-s-a.com/news/401109/

相关文章:

  • 优创智汇高端网站建设网站设计工作流程
  • 什么网站可以学做西餐个人网站怎么做支付功能
  • 千户微建站平台做网站需要切图吗
  • 织梦cms 学校网站模板网站建设中的问题
  • 山东济南网站建设公司制作wordpress模板教程视频教程
  • 档案网站的建设怎样更新网站内容
  • 网站开发项目规划房地产趋势与前景
  • 网上网站开发这个百度的网站怎么做的
  • 南昌市建设局官方网站网龙网络公司地址
  • 自助建站平台源码公司网站谁负责做
  • 旅游的网站怎么做网站流量的主要来源有
  • 高新网站设计找哪家网络科技有限公司实习报告
  • 专业网站建设质量推荐网络销售是做网站推广
  • 旅游网站建设模板wordpress最好最全的教程
  • 网站站长在哪登陆后台网站设计一年费用
  • 济南比较好的网站建设公司邢台信息网123
  • 双峰网站建设漳州优化网站建设
  • app和网站开发的成本虚拟主机是啥
  • 想做一个自己设计公司的网站怎么做的销售培训
  • 南昌网站建设模板合作凡客app哪去了
  • 有免费做网站的吗建设互联网站
  • 北京市保障房建设投资中心网站淄博哪个网站做房屋出赁好
  • 如何做网站的优化网站开发怎么收费
  • 网站的关键词怎么选择2345实用查询
  • 免费的制作网站做图剪片文案网站app接单
  • 中国有多少网站有多少域名上海网站建设网页制作邢台
  • 网站 数据报表如何做室内设计联盟官方网站入口
  • 怎样建设网站论文合肥做网站的软件公司
  • 收款后自动发货的网站是怎么做的怎么看网站后台网页尺寸
  • 谷歌seo引擎优化宁波seo关键词