免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
BOOL CStrategy:Strategy0(CFishAction m_action,CFishInfo m_FishInfo,CBallInfo &m_goalinfo,CObstaInfo m_obst,CHANNEL m_Channel)CPoint f_pt; /鱼的中心点坐标f_pt=m_FishInfo0.GetCenterPt();double f_dir; /鱼的方向,-PI,PIf_dir=m_FishInfo0.GetDirection();CPoint fhead_pt;fhead_pt = m_FishInfo0.GetHeadPoint();CPoint tempt,tempt0,tempt1,tempt2,tempt3,tempt4,tempt5,tempt6,tempt7,tempt8,tempt9,tempt10,tempt11,tempt12,tempt13;tempt0.x =61 ;tempt0.y =116 ;tempt1.x =125;tempt1.y = 50;tempt2.x = 190;tempt2.y =25;tempt3.x =227 ;tempt3.y =25 ;tempt4.x =418;tempt4.y =60;tempt5.x =542;tempt5.y =100;tempt6.x =558;tempt6.y =196;tempt7.x =555;tempt7.y =302;tempt8.x =408;tempt8.y =370;tempt9.x =267;tempt9.y =390;tempt10.x =196;tempt10.y =379; tempt11.x =147;tempt11.y =348;tempt12.x =55;tempt12.y =303;tempt13.x =30;tempt13.y =214; double disfishtoaim0;disfishtoaim0=this-Distance(f_pt,tempt0); double disfishtoaim2;disfishtoaim2=this-Distance(f_pt,tempt2); double disfishtoaim3;disfishtoaim3=this-Distance(f_pt,tempt3);double disfishtoaim5;disfishtoaim5=this-Distance(f_pt,tempt5);double disfishtoaim7;disfishtoaim7=this-Distance(f_pt,tempt7);double disfishtoaim9;disfishtoaim9=this-Distance(f_pt,tempt9);double disfishtoaim10;disfishtoaim10=this-Distance(f_pt,tempt10);double disfishtoaim12;disfishtoaim12=this-Distance(f_pt,tempt12);if (fhead_pt.x 0 & fhead_pt.x tempt0.y& fhead_pt.y tempt13.y ) m_action0.mode=0;m_action0.speed=15;Roundp2p(tempt0,m_action0,0,m_FishInfo0);if( disfishtoaim0 0 & fhead_pt.x tempt1.y & fhead_pt.y tempt1.x & fhead_pt.x 0 & fhead_pt.y 0& fhead_pt.x 0 & fhead_pt.y 60& fhead_pt.x tempt0.y & fhead_pt.y 214) m_action0.mode=0;m_action0.speed=15; Roundp2p(tempt2,m_action0,0,m_FishInfo0);if( disfishtoaim2 tempt2.x & fhead_pt.x 0 & fhead_pt.y 50 ) /此坐标值待测 m_action0.mode=0; m_action0.direction=7;m_action0.speed=15;if (fhead_pt.ytempt2.y +15) m_action0.direction=6; / 5需要调试/ Roundp2p(tempt3,m_action0,0,m_FishInfo0);if( disfishtoaim3 tempt3.x & fhead_pt.x 0 & fhead_pt.y tempt4.x & fhead_pt.x 0 & fhead_pt.y tempt3.x & fhead_pt.x tempt4.y & fhead_pt.y 214 ) m_action0.mode=0;m_action0.speed=15;Roundp2p(tempt5,m_action0,0,m_FishInfo0);if( disfishtoaim5 536& fhead_pt.x 0 & fhead_pt.y 536 & fhead_pt.x tempt5.y& fhead_pt.y tempt7.y ) m_action0.mode=0;m_action0.speed=15; m_action0.direction=7;/Roundp2p(tempt6,m_action0,0,m_FishInfo0);if (fhead_pt.x tempt5. x +15) m_action0.direction=8; / 5需要调试if( disfishtoaim7 tempt8.x & fhead_pt.x tempt7.y & fhead_pt.y tempt8. x & fhead_pt.x tempt8.y &fhead_pt.y tempt9.x & fhead_pt.x tempt7.y & fhead_pt.y 258&fhead_pt.x 214& fhead_pt.y tempt7.y) m_action0.mode=0;m_action0.speed=15;Roundp2p(tempt9,m_action0,0,m_FishInfo0);if( disfishtoaim9 tempt10.x & fhead_pt.x 330 & fhead_pt.y 450) m_action0.mode=0; m_action0.direction=7;m_action0.speed=15; / Roundp2p(tempt10,m_action0,0,m_FishInfo0);if (fhead_pt.ytempt9.y +15) m_action0.direction=8; / 5需要调试if( disfishtoaim10 tempt11.x & fhead_pt.x tempt11.y & fhead_pt.y 0& fhead_pt.x tempt12.y & fhead_pt.y tempt12.x & fhead_pt.x 214& fhead_pt.y tempt11.y ) m_action0.mode=0;m_action0.speed=15;Roundp2p(tempt12,m_action0,0,m_FishInfo0);if( disfishtoaim120 & fhead_pt.x tempt13.y & fhead_pt.y tempt12.
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025-2026学年叶子音乐教案教学设计
- 山皮石路基施工机械维修保养方案
- 支柱绝缘子安装调试施工方案及技术措施
- 2025-2026学年王心凌比爱心教学设计
- 2025-2026学年手机id设计教学
- 新生儿科血液透析管路砷沉积应急演练脚本演练方案
- 2026年商业银行大数据应用考试试题及答案
- 管道蒸汽吹扫及化学清洗方案
- 电气安装企业焊工日常检查安全操作规程
- 2025-2026学年卢焱花钟教学设计
- 玩转高中数学研讨 08 立体几何与空间向量学霸必刷100题(原卷版)
- 及时雨高考英语词汇默写本上册答案1-10
- 中考英语1600词(词频顺序自测版)
- JTG-T 3331-04-2023 多年冻土地区公路设计与施工技术规范
- 跟骨骨折个案护理
- 日照站改造工程既有投光灯塔拆除专项方案(修改版2)
- 大数据 AI大模型-智慧统计大数据平台解决方案(2023版)
- 上海海湾别墅市场分析
- TSG 07-2019 特种设备生产和充装单位许可规则 含2021年第号修改单和2024年第2号修改单
- 医疗器械临床试验数据管理
- 初中信息技术知识点汇总(完整版)
评论
0/150
提交评论