亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? worldmodelhighlevel.cpp

?? RoboCup仿真組世界冠軍源代碼
?? CPP
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
/*Copyright (c) 2000-2003, Jelle Kok, University of AmsterdamAll rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice, thislist of conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentationand/or other materials provided with the distribution.3. Neither the name of the University of Amsterdam nor the names of itscontributors may be used to endorse or promote products derived from thissoftware without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*//*! \file WorldModelHighLevel.cpp<pre><b>File:</b>          WorldModelHighLevel.cpp<b>Project:</b>       Robocup Soccer Simulation Team: UvA Trilearn<b>Authors:</b>       Jelle Kok<b>Created:</b>       12/02/2001<b>Last Revision:</b> $ID$<b>Contents:</b>      class definitions of WorldModel. This class contains               methods that reason about the world model on a higher               level and return more abstract information about the current               world state.<hr size=2><h2><b>Changes</b></h2><b>Date</b>             <b>Author</b>          <b>Comment</b>12/02/2001       Jelle Kok       Initial version created</pre>*/#include<list>            // needed for list<double>#include<stdio.h>         // needed for printf#include "WorldModel.h"/*! This method returns the number of objects that are within the circle 'c'    Only objects are taken into account that are part of the set 'set' and    have a confidence higher than the threshold defined in PlayerSettings.    \param c circle in which objects should be located to be counted    \return number of objects from 'set' in circle 'c'*/int WorldModel::getNrInSetInCircle( ObjectSetT set, Circle c ){  double dConfThr = PS->getPlayerConfThr();  int    iNr      = 0;  int    iIndex;  for( ObjectT o = iterateObjectStart( iIndex, set, dConfThr );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, dConfThr ) )  {    if( c.isInside( getGlobalPosition( o ) ) )      iNr++;  }  iterateObjectDone( iIndex );  return iNr;}/*! This method returns the number of visible objects that are part of    the object set 'set' and located in the rectangle 'rect'. When no    rectangle is defined (rect=NULL) the whole field is taken into    account. Only objects with a confidence value higher than the    threshold defined in PlayerSettings are taken into consideration.    \param set ObjectSetT from which objects are taken into consideration    \param rect Rectangle in which objects are counted (default NULL)    \return number of objects in Rectangle 'rect'.*/int WorldModel::getNrInSetInRectangle( ObjectSetT set, Rect *rect  ){  double dConfThr = PS->getPlayerConfThr();  int    iNr      = 0;  int    iIndex;  for( ObjectT o = iterateObjectStart( iIndex, set, dConfThr );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, dConfThr ) )  {    if( rect == NULL || rect->isInside( getGlobalPosition( o ) ) )      iNr++;  }  iterateObjectDone( iIndex );  return iNr;}/*! This method returns the number of objects in the specified cone.    A cone is like a piece of a pie, in which 'start' is    the center of the pie, 'end' is the edge of the pie and 'dWidth' is the    half width of the piece after distance 1. Only objects are taken into    consideration that are within the set 'set' and have a confidence higher    than the threshold defined in PlayerSettings.    \param set ObjectSetT of which objects are taken into consideration    \param dWidth half width of the cone after distance 1.0    \param start center of the cone    \param end position that is the end of the cone.    \return number of objects part of 'set' and located in this cone. */int WorldModel::getNrInSetInCone( ObjectSetT set, double dWidth,                                      VecPosition start , VecPosition end ){  double      dConfThr   = PS->getPlayerConfThr();  int         iNr        = 0;  int         iIndex;  Line        line       = Line::makeLineFromTwoPoints( start, end );  VecPosition posOnLine;  VecPosition posObj;  for( ObjectT o = iterateObjectStart( iIndex, set, dConfThr );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, dConfThr ) )  {    posObj    = getGlobalPosition( o );    posOnLine = line.getPointOnLineClosestTo( posObj );    // whether posOnLine lies in cone is checked by three constraints    // - does it lie in triangle (to infinity)    // - lies between start and end (and thus not behind me)    // - does it lie in circle    if(posOnLine.getDistanceTo(posObj) < dWidth*posOnLine.getDistanceTo(start)       && line.isInBetween( posOnLine, start, end )       && start.getDistanceTo( posObj ) < start.getDistanceTo( end ) )        iNr++;  }  iterateObjectDone( iIndex );  return iNr;}/*! This method returns whether the space in direction 'ang'' of    object 'obj' is occupied by any opponents. */bool WorldModel::isEmptySpace( ObjectT obj, AngDeg ang, double dDist ){  if( obj == OBJECT_ILLEGAL )    return false;  VecPosition pos = getGlobalPosition( obj );   pos += VecPosition( dDist, ang, POLAR );  if( getNrInSetInCircle( OBJECT_SET_OPPONENTS, Circle( pos, dDist ) ) == 0 )    return true;  return false;}bool WorldModel::coordinateWith( ObjectT obj ){  VecPosition pos = getGlobalPosition( obj );  if( pos.getDistanceTo( getBallPos() ) < 30.0 &&      pos.getX() > getBallPos().getX() - 5.0 )  {        if( getFastestInSetTo( OBJECT_SET_TEAMMATES, OBJECT_BALL ) ==        getAgentObjectType() )    {      logCircle( 700, pos, 2.5 );    }    Log.log( 700, "coordinate with %d %f %f (%f %f)",              obj, pos.getDistanceTo( getBallPos() ),             pos.getX(), getBallPos().getX(), getBallPos().getY() );    return true;  }    return false;}/*! This method returns the object type of the closest object to the    ObjectT that is supplied as the second argument. Only objects are    taken into account that are part of the set 'set' and have a    confidence higher than the supplied threshold. If no threshold is    supplied, the threshold defined in PlayerSettings is used.    \param set ObjectSetT which denotes objects taken into consideration    \param objTarget ObjectT that represent the type of the object to    compare to    \param dDist will be filled with the closest distance    \param dConfThr minimum confidence threshold for the objects in 'set'    \return ObjectType that is closest to o */ObjectT WorldModel::getClosestInSetTo( ObjectSetT set, ObjectT objTarget,                                        double *dDist, double dConfThr ){  if( dConfThr == -1.0 ) dConfThr      = PS->getPlayerConfThr();  ObjectT     closestObject = OBJECT_ILLEGAL;  double      dMinMag       = 1000.0;  VecPosition v;  int         iIndex;  for( ObjectT o = iterateObjectStart( iIndex, set, dConfThr );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, dConfThr ) )  {    if( o != objTarget )               // do not include target object    {      v = getGlobalPosition( objTarget ) - getGlobalPosition( o );      if( v.getMagnitude() < dMinMag )      {        dMinMag       = v.getMagnitude();        closestObject = o;      }    }  }  iterateObjectDone( iIndex );  if( dDist != NULL )    *dDist = dMinMag;  return closestObject;}/*! This method returns the ojbect type of the closest object to the specified    position and that is part of the object set 'set' with a confidence    higher than the    supplied threshold. If no threshold is supplied, the threshold defined in    PlayerSettings is used.    \param set ObjectSetT which denotes objects taken into consideration    \param pos position to which player should be compared    \param dDist will be filled with the distance between pos and    closest object    \param dConfThr minimum confidence threshold for the objects in 'set'    \return ObjectT representing object that is closest to pos */ObjectT WorldModel::getClosestInSetTo( ObjectSetT set, VecPosition pos,                                       double *dDist,  double dConfThr ){  ObjectT     closestObject   = OBJECT_ILLEGAL;  double      dMinMag         = 1000.0;  VecPosition v;  int         iIndex;  if( dConfThr == -1.0 ) dConfThr      = PS->getPlayerConfThr();  for( ObjectT o = iterateObjectStart( iIndex, set, dConfThr );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, dConfThr ) )  {    v = pos - getGlobalPosition( o );    if( v.getMagnitude() < dMinMag )    {      dMinMag         = v.getMagnitude();      closestObject   = o;    }  }  iterateObjectDone( iIndex );  if( dDist != NULL )    *dDist = dMinMag;  return closestObject;}/*! This method returns the closest object in 'set' to the line    'l'. The projection p of the global position of this object on the    line 'l' should lie between pos1 and pos2. After the method is    finished, it returns this object and the last two arguments of    this method are set to the the distance between the object and p    and the distance from pos1 to p respectively.    \param set ObjectSetT which denotes objects taken into consideration    \param l line to which opponents should be projected    \param pos1 minimum allowed projection point    \param pos2 maximum allowed projection point    \param dDistObjToLine will contain distance from opponent to line l    \param dDistPos1ToPoint will contain distance from pos1 to projection point    opponent on line l    \return object type of closest object to line l */ObjectT WorldModel::getClosestInSetTo( ObjectSetT set, Line l,                              VecPosition pos1, VecPosition pos2,                              double *dDistObjToLine, double *dDistPos1ToPoint){  VecPosition posObj;  VecPosition posOnLine;  double      dConfThr  = PS->getPlayerConfThr();  ObjectT     obj       = OBJECT_ILLEGAL;  double      dDist     ;  double      dMinDist  = 1000.0;  double      dDistPos1 = 1000.0;  int         iIndex;  for( ObjectT o = iterateObjectStart( iIndex, set, dConfThr );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, dConfThr ) )  {    posObj    = getGlobalPosition( o );    posOnLine = l.getPointOnLineClosestTo( posObj );    dDist     = posObj.getDistanceTo( posOnLine );    if( l.isInBetween( posOnLine, pos1, pos2 ) && dDist < dMinDist )    {      dMinDist  = dDist;      obj       = o;      dDistPos1 = pos1.getDistanceTo( posOnLine );    }  }  iterateObjectDone( iIndex );  if( dDistObjToLine != NULL )    *dDistObjToLine = dMinDist;  if( dDistPos1ToPoint != NULL )    *dDistPos1ToPoint = dDistPos1;  return obj;}/*! This method returns the object type of the closest object relative to    the agent. Only objects are taken into account that are part of the set    'set'.    \param set ObjectSetT which denotes objects taken into consideration    \param dDist will be filled with the closest relative distance    \return ObjectType that is closest to the agent*/ObjectT WorldModel::getClosestRelativeInSet( ObjectSetT set, double *dDist ){  ObjectT     closestObject = OBJECT_ILLEGAL;  double      dMinMag       = 1000.0;  int         iIndex;  for( ObjectT o = iterateObjectStart( iIndex, set, 1.0 );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, 1.0 ) )  {    if( getRelativeDistance( o ) < dMinMag )    {      dMinMag       = getRelativeDistance( o );      closestObject = o;    }  }  iterateObjectDone( iIndex );

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美日韩一区二区三区在线观看| 一片黄亚洲嫩模| 自拍偷拍国产精品| 免费一级片91| 国产成人精品影视| 欧美情侣在线播放| 中文字幕一区二区视频| 欧美aaaaa成人免费观看视频| 国产成人午夜精品5599| 欧美高清视频一二三区| 亚洲欧洲精品成人久久奇米网| 男人的j进女人的j一区| 欧美三级欧美一级| 国产精品高潮呻吟| 国产a视频精品免费观看| 欧美人妇做爰xxxⅹ性高电影 | 精品一区二区三区视频 | 欧美日韩精品一区二区三区蜜桃| 久久免费的精品国产v∧| 天天操天天综合网| 欧美三级日韩三级| 亚洲一区二区三区四区的| a在线播放不卡| 国产欧美一区在线| 国产精品一区二区久久精品爱涩 | 成人影视亚洲图片在线| 久久久一区二区| 精品一区二区在线播放| 日韩精品一区二区三区视频播放| 丝袜美腿亚洲综合| 欧美丰满一区二区免费视频 | 色呦呦网站一区| 国产精品毛片久久久久久| 极品少妇xxxx精品少妇偷拍| 日韩欧美国产系列| 日欧美一区二区| 欧美日韩aaaaaa| 亚洲成人av电影| 51精品视频一区二区三区| 亚洲午夜视频在线| 777亚洲妇女| 日韩精品亚洲专区| 日韩免费高清电影| 久久99久久久欧美国产| 久久久蜜臀国产一区二区| 经典三级一区二区| 国产视频911| www.性欧美| 亚洲人成人一区二区在线观看 | 国产精品大尺度| av在线一区二区| 一区二区三区小说| 欧美精品久久一区二区三区| 日韩专区欧美专区| 欧美精品一区男女天堂| 国产美女精品一区二区三区| 中文字幕av免费专区久久| av在线播放成人| 午夜欧美一区二区三区在线播放| 91精品国产综合久久精品麻豆| 麻豆成人久久精品二区三区小说| 久久亚洲一级片| av色综合久久天堂av综合| 亚洲最大的成人av| 欧美大片在线观看一区二区| 国产99久久久国产精品潘金网站| 亚洲天堂2016| 欧美疯狂做受xxxx富婆| 国产精品99精品久久免费| 亚洲欧美视频在线观看视频| 欧美精品色一区二区三区| 国产毛片一区二区| 亚洲一区二区三区中文字幕在线 | 国产不卡高清在线观看视频| 国产精品午夜春色av| 精品视频123区在线观看| 极品少妇xxxx精品少妇偷拍| 亚洲嫩草精品久久| 337p日本欧洲亚洲大胆色噜噜| 99视频精品免费视频| 奇米色一区二区| 一区二区三区不卡在线观看| 欧美电影免费观看高清完整版 | 在线欧美日韩精品| 久久精品免费看| 亚洲少妇屁股交4| 欧美电影精品一区二区| 色哟哟国产精品免费观看| 久久精品免费看| 亚洲午夜电影在线| 欧美极品xxx| 日韩亚洲欧美在线| 日本韩国精品在线| 国产91精品露脸国语对白| 秋霞影院一区二区| 一区二区三区在线观看国产| 国产女同性恋一区二区| 欧美一区二区在线看| 日本福利一区二区| 波多野结衣视频一区| 狠狠久久亚洲欧美| 天堂久久一区二区三区| 亚洲综合在线视频| 亚洲精品国产一区二区三区四区在线| 久久嫩草精品久久久久| 日韩三级伦理片妻子的秘密按摩| 欧美视频你懂的| 色婷婷综合久久久中文字幕| 成人一区在线看| 国产综合色产在线精品| 免费成人在线观看视频| 午夜影视日本亚洲欧洲精品| 一区二区三区精品视频在线| 国产精品三级在线观看| 国产三级精品三级| 久久久国产精品不卡| 久久亚洲影视婷婷| 久久精品视频免费| 久久久精品综合| 26uuu久久综合| 国产欧美日韩精品a在线观看| 久久精品免费在线观看| 亚洲黄色尤物视频| 亚洲乱码国产乱码精品精98午夜 | 一区二区三区在线免费视频| 中文字幕一区二区三区视频| 国产精品你懂的在线| 亚洲国产精华液网站w| 国产精品白丝在线| 亚洲男人都懂的| 一区二区三区四区高清精品免费观看| 亚洲免费av观看| 亚洲妇熟xx妇色黄| 日本不卡在线视频| 精品一区二区三区在线播放视频| 国产剧情一区二区三区| 高清在线观看日韩| 色婷婷av一区二区| 777xxx欧美| 久久久久久久久久久久久久久99 | 亚洲人123区| 亚洲二区在线观看| 麻豆精品久久久| 国产麻豆精品久久一二三| 国产电影一区二区三区| 色悠悠久久综合| 欧美一级搡bbbb搡bbbb| 久久久亚洲综合| **欧美大码日韩| 日韩高清中文字幕一区| 精品一区二区三区av| 成人一道本在线| 欧美日韩一区二区欧美激情| 日韩美女在线视频| 亚洲欧洲性图库| 午夜精品久久久久久久99水蜜桃| 麻豆国产一区二区| 97成人超碰视| 日韩欧美视频一区| 《视频一区视频二区| 日韩国产欧美在线观看| 成人性生交大片免费看在线播放| 91黄视频在线| 精品国产一区二区三区久久影院| 一区在线播放视频| 奇米精品一区二区三区四区| caoporn国产精品| 日韩欧美电影一二三| 亚洲欧美另类久久久精品2019| 美洲天堂一区二卡三卡四卡视频| 成人av高清在线| 日韩一级完整毛片| 亚洲欧美区自拍先锋| 国产一区二区伦理| 欧美精品v国产精品v日韩精品| 国产视频亚洲色图| 午夜影视日本亚洲欧洲精品| 国产1区2区3区精品美女| 69堂精品视频| 一区二区三区国产豹纹内裤在线| 国产激情视频一区二区在线观看 | 91免费小视频| 国产日韩欧美精品综合| 奇米影视一区二区三区| 欧美主播一区二区三区美女| 中文字幕免费不卡在线| 久久福利资源站| 欧美一区二区三区四区五区| 亚洲激情成人在线| 99精品视频一区二区三区| 国产农村妇女精品| 精品在线你懂的| 日韩欧美一区二区在线视频| 亚洲高清视频中文字幕| 色综合久久久久网| 国产精品乱码妇女bbbb| 国产成人h网站| 中文字幕电影一区| 国产sm精品调教视频网站| 久久久久久久久一|