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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? worldmodelhighlevel.cpp

?? RoboCup仿真組世界冠軍源代碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
    Log.log( 553, "predicted pos %d cycles: (%f,%f)" ,      iCycle, pos.getX(), pos.getY() );    iCycle ++;  }  return ( iCycle == 20 ) ? false : true;}/*! This method returns whether the ball is in our possesion. This is defined     by the fact if the fastest player to the ball is a teammate or not.     \return bool indicating whether a teammate is the fastest player to the             ball. */bool WorldModel::isBallInOurPossesion( ){  int     iCyc;  ObjectT o = getFastestInSetTo( OBJECT_SET_PLAYERS, OBJECT_BALL, &iCyc );  if( o == OBJECT_ILLEGAL )    return false;  if( SoccerTypes::isTeammate( o ) )    return true;  else    return false;}/*! This method returns whether the ball lies in the own penalty area.    \return bool indicating whether ball lies in own penalty area.     */bool WorldModel::isBallInOwnPenaltyArea( ){  return isInOwnPenaltyArea( getBallPos() );}/*! This method returns whether the specified position lies in the own penalty    area.    \param pos position which should be checked    \return bool indicating whether 'pos' lies in own penalty area. */bool WorldModel::isInOwnPenaltyArea( VecPosition pos ){  ObjectT     objFlag = ( getSide() == SIDE_LEFT  )                              ?  OBJECT_FLAG_P_L_C                              :  OBJECT_FLAG_P_R_C ;  if( isPenaltyUs() || isPenaltyThem() )    objFlag = ( getSidePenalty() == SIDE_LEFT ) ? OBJECT_FLAG_P_L_C                                                 : OBJECT_FLAG_P_R_C ;  VecPosition posFlag =SoccerTypes::getGlobalPositionFlag( objFlag, getSide());  if( fabs(pos.getX())   > fabs(posFlag.getX()) &&      fabs( pos.getY() ) < PENALTY_AREA_WIDTH/2.0 )    return true;  return false;}/*! This method returns whether the specified position lies in the opponent    penalty area.    \param pos position which should be checked    \return boolean indicating whether 'pos' lies in opponent penalty area. */bool WorldModel::isInTheirPenaltyArea( VecPosition pos ){  ObjectT     objFlag = ( getSide() == SIDE_LEFT )                              ?  OBJECT_FLAG_P_R_C                              :  OBJECT_FLAG_P_L_C ;  VecPosition posFlag = SoccerTypes::getGlobalPositionFlag( objFlag,getSide());  if ( pos.getX() > posFlag.getX() &&       fabs(pos.getY()) < PENALTY_AREA_WIDTH/2.0 )    return true;  return false;}/*! This method determines whether the confidence for 'o' is good. The    confidence of the object is compared to the player_conf_thr    defined in PlayerSettings. When the confidence is higher than this    value and the object does not equal the agent object type true is    returned, otherwise false.    \param o object of which confidence value should be returned    \return bool indicating whether object information has good confidence. */bool WorldModel::isConfidenceGood( ObjectT o ){  return getConfidence( o ) > PS->getPlayerConfThr() &&         o != getAgentObjectType();}/*! This method determines whether the confidence for 'o' is very    good. The confidence of the object is compared to the    player_high_conf_thr defined in PlayerSettings. When the    confidence is higher than this value and the object does not equal    the agent object type true is returned, otherwise false.    \param o object of which confidence value should be returned    \return bool indicating whether object information has good confidence. */bool WorldModel::isConfidenceVeryGood( ObjectT o ){  return getConfidence( o ) > PS->getPlayerHighConfThr() &&         o != getAgentObjectType();}/*! This method checks whether the specified object stands onside. This is done    by comparing the x coordinate of the object to the offside line.    \return boolean indicating whether 'obj' stands onside. */bool WorldModel::isOnside( ObjectT obj ){  return getGlobalPosition( obj ).getX() < getOffsideX() - 0.5 ;}/*! This method determines whether there stands an opponent in the global    direction of the specified angle and in distance 'dDist'. An opponent is    considered to stand in the global direction when the angle difference with    the specified angle is smaller than 60 degrees.    \param ang angle of the global direction in which to check opponents    \param dDist distance in which opponents should be checked    \return bool indicating wheter an opponent was found. */bool WorldModel::isOpponentAtAngle( AngDeg ang , double dDist ){  VecPosition posAgent   = getAgentGlobalPosition();  VecPosition posOpp;  AngDeg      angOpp;  int         iIndex;  for( ObjectT o = iterateObjectStart( iIndex, OBJECT_SET_OPPONENTS );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, OBJECT_SET_OPPONENTS ) )  {    posOpp    = getGlobalPosition( o );    angOpp    = ( posOpp - posAgent ).getDirection() ;    if( fabs( angOpp - ang ) < 60 &&        posAgent.getDistanceTo( posOpp ) < dDist )      return true;    else if( fabs( angOpp - ang ) < 120 &&             posAgent.getDistanceTo( posOpp ) < dDist/2.0 )      return true;  }  iterateObjectDone( iIndex );  return false;}/*! This method returns the inverse confidence, i.e. the time that belongs    to the specified confidence. This can be used to determine    the time the object was last seen when the confidence is given. Herefore    the current time is used.    \param dConf confidence    \return server cycle the object was last seen. */Time WorldModel::getTimeFromConfidence( double dConf ){  return getCurrentTime()-(int)((1.00-dConf)*100);}/*! This method returns the object type of the last opponent defender. This    opponent resembles the offside line.     \param if non-null dX will be filled with the x position of this object    \return object type of the last opponent defender */ObjectT WorldModel::getLastOpponentDefender( double *dX ){  double  dHighestX = 0.0;  double  dSecondX  = 0.0, x;  ObjectT o, oLast = OBJECT_ILLEGAL, oSecondLast = OBJECT_ILLEGAL;  for( int i = 0; i < MAX_OPPONENTS ; i ++ )  {    o = Opponents[i].getType();    if( isConfidenceGood( o ) )    {      x = Opponents[i].getGlobalPosition().getX();      if( x > dHighestX )         // if larger x than highest      {        dSecondX    = dHighestX;  // make second the previous highest        dHighestX   = x;          // and this the new one        oSecondLast = oLast;        oLast       = o;      }      else if( x > dSecondX )     // if smaller than 1st  and larger than 2nd      {        dSecondX    = x;          // make it the second        oSecondLast = o;      }    }  }    // if highest x is outside pen_area, it cannot be the goalie (unless playing  // Portugal ;-) ), so assume goalie is just not seen  if( dHighestX < PENALTY_X && getOppGoalieType() == OBJECT_ILLEGAL )  {    dSecondX    = dHighestX;    oSecondLast = oLast;  }  if( dX != NULL )    *dX = dSecondX ;  return oSecondLast;}/*! This method returns the x coordinate of the offside line using the known    information in the WorldModel. If a player moves beyond this line, he    stands offside. First the opponent with the second highest x coordinate is    located, then the maximum of this x coordinate and the ball x coordinate    is returned.    \param bIncludeComm boolean indicating whether communicated offside line          should also be included.    \return x coordinate of the offside line. */double WorldModel::getOffsideX( bool bIncludeComm ){  double  x, dAgentX;  getLastOpponentDefender( &dAgentX );  x = getBallPos().getX();  x = max( x, dAgentX );  if( bIncludeComm == true && getCurrentTime() - m_timeCommOffsideX < 3 )    x = max( x, m_dCommOffsideX );  return x ;}/*! This method returns the outer position on the field given a position 'pos'    and a global angle 'ang'. The outer position is defined as the point on    the field where the line created from this position and angle crosses    either a side line, goal line or penalty line. To be on the safe side a    small value is specified, which denotes the distance from the side line    that should be returned.    \param pos position on the field from which outer position should be    calculated    \param ang global angle which denotes the global direction in pos    \param dDist distance from line    \param bWithPenalty boolean denoting whether penalty area should be taken                        into account (if false only goal line and side line                        are used.    \return position denoting the outer position on the field */VecPosition WorldModel::getOuterPositionInField( VecPosition pos, AngDeg ang,                                  double dDist, bool bWithPenalty ){  VecPosition posShoot;  // make shooting line using position and desired direction  Line lineObj     = Line::makeLineFromPositionAndAngle( pos, ang );  // get intersection point between the created line and goal line  Line lineLength  = Line::makeLineFromPositionAndAngle(                            VecPosition( PITCH_LENGTH/2.0 - dDist, 0.0 ), 90 );  posShoot         = lineObj.getIntersection( lineLength );  // check whether it first crosses the penalty line  Line linePenalty = Line::makeLineFromPositionAndAngle(                            VecPosition( PENALTY_X - dDist, 0.0 ), 90.0 );  double dPenaltyY = lineObj.getIntersection(linePenalty).getY();  if( bWithPenalty && fabs(dPenaltyY) < PENALTY_AREA_WIDTH/2.0 )  {    if( fabs(dPenaltyY) < PENALTY_AREA_WIDTH/2.0 - 5.0 ||   // crosses inside        fabs(posShoot.getY()) <  PENALTY_AREA_WIDTH/2.0 )   // or ends inside      posShoot = lineObj.getIntersection( linePenalty );  }  // check where it crosses the side line  Line lineSide = ( ang < 0 )     ? Line::makeLineFromPositionAndAngle(                           VecPosition( 0.0, - PITCH_WIDTH/2.0 + dDist ),0.0 )     : Line::makeLineFromPositionAndAngle(                           VecPosition( 0.0, + PITCH_WIDTH/2.0 - dDist ),0.0 );  if( fabs(posShoot.getY()) > PITCH_WIDTH/2.0 - dDist )    posShoot = lineObj.getIntersection( lineSide );  return posShoot;}/*! This method determines the (global) direction which has the largest    angle between the opponents and is located in the interval angMin..    angMax.    \param origin of which the angles angMin and angMax are based on.    \param angMin minimal global direction that should be returned    \param angMax maximal global direction that should be returned    \param angLargest will contain the size of the largest angle of the           direction that is returned    \param dDist only opponents with relative distance smaller than this value           will be taken into account.    \return global direction with the largest angle between opponents */AngDeg WorldModel::getDirectionOfWidestAngle(VecPosition posOrg, AngDeg angMin,                               AngDeg angMax, AngDeg *angLargest, double dDist){  list<double> v;  list<double> v2;  double       temp;  int          iIndex;  double       dConf  = PS->getPlayerConfThr();  // add all angles of all the opponents to the list v  for( ObjectT o = iterateObjectStart( iIndex, OBJECT_SET_OPPONENTS, dConf );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, OBJECT_SET_OPPONENTS, dConf ) )  {    if( getRelativeDistance( o ) < dDist )      v.push_back( (getGlobalPosition(o)-posOrg).getDirection());  }  iterateObjectDone( iIndex );  v.sort();  // if goalkeeper is spotted and he is located within the range that we want  // to shoot at, make sure the angle with the goalkeeper is large enough, since  // he has better intercepting capabilities than the normal players  ObjectT     objGoalie = getOppGoalieType();  VecPosition posGoalie = getGlobalPosition( objGoalie );  AngDeg      angGoalie;  if( objGoalie != OBJECT_ILLEGAL && posOrg.getX() > PITCH_LENGTH/4.0 &&      posOrg.getDistanceTo( posGoalie ) < dDist )  {    angGoalie = ( posGoalie - posOrg ).getDirection();    Log.log( 560, "direction_widest_angle: min %f max %f angGoalie %f",                                                  angMin, angMax, angGoalie );    if( posOrg.getY() > 0 ) // right side of the field    {      angGoalie = VecPosition::normalizeAngle( angGoalie - 33 );      angMax    = max( angMin, min( angGoalie, angMax ) );    }    else    {      angGoalie = VecPosition::normalizeAngle( angGoalie + 33 );      angMin    = min( angMax, max( angMin, angGoalie ) );    }    Log.log( 560, "direction_widest_angle after: %f %f", angMin, angMax );  }  // Create new list with only opponents from interval [angMin..angMax].  // Note that opponents outside angMin and angMax can have an influence  // on the largest angle between the opponents, so they should be accounted  // for. To this end, a projection is defined in both angMin and angMax.  // The opponent with the smallest global angle difference a to angMin  // (either inside or outside the interval [angMin..angMax]) is determined  // and an extra angle angMin - a is added to the list. The situation for  // angMax is analogous.  double absMin     = 1000;  double absMax     = 1000;  double angProjMin = angMin;  double angProjMax = angMax;  double array[MAX_OPPONENTS+2];  while( v.size() > 0 )

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色一情一乱一乱一91av| 精品欧美乱码久久久久久| 欧美美女直播网站| 亚洲精品在线观看网站| 亚洲精品中文字幕乱码三区 | 欧美一区二区三区的| 国产日韩欧美不卡在线| 天天操天天综合网| jlzzjlzz国产精品久久| 91精品国产综合久久小美女| 日本一区二区高清| 秋霞电影网一区二区| 91麻豆蜜桃一区二区三区| 久久精品视频网| 国产一区二区三区免费| 国产精品久久久久aaaa樱花| 91在线视频免费91| 精油按摩中文字幕久久| 91亚洲午夜精品久久久久久| 亚洲午夜三级在线| 亚洲日本va午夜在线电影| 色综合网站在线| 国产在线不卡一卡二卡三卡四卡| aaa亚洲精品| 国产亚洲美州欧州综合国| 日本不卡的三区四区五区| 一本色道综合亚洲| 成人免费一区二区三区在线观看| 国产一区二区美女| 欧美tk丨vk视频| 日韩激情视频在线观看| 欧美日韩日日骚| 亚洲成av人片| 欧美日韩黄色一区二区| 亚洲丶国产丶欧美一区二区三区| 色先锋aa成人| 一区二区三区欧美激情| 色美美综合视频| 一区二区三区小说| 欧美无砖砖区免费| 亚洲一卡二卡三卡四卡五卡| 在线观看免费亚洲| 亚洲综合久久久| 欧美日韩一区不卡| 日本视频一区二区| 日韩情涩欧美日韩视频| 久久精品国产99国产精品| 26uuu国产日韩综合| 国产乱码精品一区二区三区av | 亚洲美女一区二区三区| 91网站在线播放| 洋洋av久久久久久久一区| 欧美日韩一区精品| 日本美女一区二区| 久久夜色精品国产欧美乱极品| 国产伦精品一区二区三区在线观看 | 午夜影院在线观看欧美| 日本精品免费观看高清观看| 亚洲国产视频直播| 欧美一级夜夜爽| 国产精品88av| 亚洲免费高清视频在线| 欧美日韩国产美| 韩国欧美一区二区| 1区2区3区欧美| 欧美精品亚洲一区二区在线播放| 亚洲午夜私人影院| ww亚洲ww在线观看国产| 91丨porny丨首页| 免费观看久久久4p| 国产精品国产自产拍在线| 欧美日韩成人高清| 国产精品自拍三区| 午夜精品久久一牛影视| 久久亚洲二区三区| 色8久久人人97超碰香蕉987| 美女脱光内衣内裤视频久久影院| 亚洲国产高清aⅴ视频| 7777精品伊人久久久大香线蕉| 国产伦理精品不卡| 午夜精品免费在线观看| 成人免费在线播放视频| 日韩亚洲欧美成人一区| 99精品欧美一区二区蜜桃免费| 日韩福利视频导航| 国产女主播一区| 欧美日本视频在线| 99国内精品久久| 久久精品国产精品亚洲精品| 亚洲一区影音先锋| 欧美韩日一区二区三区四区| 777久久久精品| 91久久一区二区| 丁香六月综合激情| 理论电影国产精品| 天堂蜜桃91精品| 一区二区三区丝袜| 国产精品嫩草影院av蜜臀| 欧美大度的电影原声| 欧美视频在线观看一区二区| 成人黄页毛片网站| 国产伦精品一区二区三区免费迷| 日韩精品五月天| 一区二区欧美在线观看| 综合久久综合久久| 国产精品国模大尺度视频| 国产亚洲综合av| 精品99久久久久久| 日韩一区二区精品在线观看| 欧美日韩一级二级三级| 在线亚洲高清视频| 91蜜桃视频在线| 99久久国产综合色|国产精品| 粉嫩高潮美女一区二区三区| 狠狠色丁香久久婷婷综合_中| 日本网站在线观看一区二区三区 | 久久久电影一区二区三区| 欧美成人官网二区| 欧美成人vps| 精品久久久网站| 精品国产乱码久久久久久闺蜜| 91精品国产色综合久久| 91精品国产综合久久香蕉麻豆 | 91精品视频网| 日韩欧美一区在线| 日韩视频永久免费| 精品粉嫩超白一线天av| 久久夜色精品国产噜噜av| 国产欧美日韩三级| 国产精品麻豆一区二区| 成人免费在线播放视频| 一区二区在线观看免费视频播放| 亚洲精品国产成人久久av盗摄 | 欧美韩日一区二区三区| 国产精品丝袜一区| 亚洲免费在线电影| 亚洲一区二区三区爽爽爽爽爽| 亚洲第一久久影院| 麻豆91精品91久久久的内涵| 黑人巨大精品欧美一区| 成人午夜精品一区二区三区| 99精品视频在线观看| 欧美日韩另类一区| 精品国产一区二区亚洲人成毛片| 久久久久久久综合狠狠综合| 亚洲欧洲日产国产综合网| 亚洲国产乱码最新视频| 久久精品999| av电影在线观看不卡| 欧美日韩精品一区二区三区四区 | 亚洲视频一二三区| 日韩成人dvd| 成人听书哪个软件好| 欧美视频在线一区二区三区 | 精品一区二区三区影院在线午夜| 国产盗摄女厕一区二区三区| 色综合天天综合| 91麻豆精品国产91久久久使用方法| 久久亚洲私人国产精品va媚药| 《视频一区视频二区| 秋霞午夜av一区二区三区| jizzjizzjizz欧美| 欧美电视剧免费全集观看 | 久久亚洲精品国产精品紫薇| 亚洲欧美经典视频| 国内成人精品2018免费看| 色拍拍在线精品视频8848| 日韩欧美国产高清| 一级中文字幕一区二区| 国产高清无密码一区二区三区| 欧美亚洲动漫另类| 国产精品系列在线| 免费高清在线一区| 欧美日韩精品一区二区三区| 国产精品大尺度| 老司机午夜精品99久久| 欧美日韩精品免费| 亚洲欧洲精品一区二区三区不卡| 久久狠狠亚洲综合| 91传媒视频在线播放| 国产精品青草综合久久久久99| 秋霞电影一区二区| 欧美日韩免费视频| 国产精品国产三级国产a| 国产综合成人久久大片91| 欧美日本免费一区二区三区| 亚洲日本乱码在线观看| 高清久久久久久| 久久伊人中文字幕| 蜜臀久久99精品久久久画质超高清| 91论坛在线播放| 国产精品久久久久久久午夜片| 极品少妇一区二区| 91精品福利在线一区二区三区| 亚洲综合成人在线| 色婷婷综合五月| 亚洲男人的天堂av| 91蝌蚪国产九色| 国产精品国产三级国产aⅴ入口| 国产ts人妖一区二区|