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

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

?? worldmodelhighlevel.cpp

?? RoboCup仿真組世界冠軍源代碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
  {    if( fabs( v.front() - angMin ) < absMin )      // opp near angMin    {      absMin     = fabs( v.front() - angMin ) ;    // make angMin wider      angProjMin = angMin - absMin;                // to take him into account    }    if( fabs( v.front() - angMax ) < absMax )      // opp near angMax    {      absMax     = fabs( v.front() - angMax ) ;    // make angMax wider      angProjMax = angMax + absMax;                // to take him into account    }    if( v.front() > angMin && v.front() < angMax ) // opp in range      v2.push_back( v.front() );                   // add him    v.pop_front();  }  // make all angles relative to angProjMin which has angle 0 and set them in  // the range 0..360, where the range -180..0 is moved to 180..360. Do this by  // adding 360 and then subtracting 360 if value is larger than 360.  v.push_back( 0 );  while( v2.size() > 0 )  // for all the opponents  {    temp = VecPosition::normalizeAngle(v2.front()-angProjMin)+360.0;    if( temp > 360 )      temp -= 360;    v.push_back( temp );    v2.pop_front();  }  // add max projection.  temp = VecPosition::normalizeAngle(angProjMax-angProjMin)+360.0;  if( temp > 360 )    temp -= 360;  v.push_back( temp );  // sort the list  v.sort();  // put all the values in an array  int i = 0;  while( v.size() > 0 )  {    array[i++] = v.front();    v.pop_front();  }  // find the largest angle and determine the associated midpoint direction  double dLargest = -1000;  double d;  double ang      = UnknownAngleValue;  for( int j = 0; j < i - 1 ; j ++ )  {    d = VecPosition::normalizeAngle(( array[j+1] - array[j] )/2.0);    if( d > dLargest )    {      ang = angProjMin + array[j] + d;      ang = VecPosition::normalizeAngle( ang );      dLargest = d;    }  }  if( ang == UnknownAngleValue ) // no angle found -> get angle in between  {    ang = getBisectorTwoAngles( angMin, angMax );    if( angLargest != NULL )      *angLargest = 360;  }  else if( angLargest != NULL )    *angLargest = dLargest;  return ang;}/*! This method returns whether the position 'pos' is inside the playfield. */bool WorldModel::isInField( VecPosition pos, double dMargin ){  return Rect(              VecPosition( + PITCH_LENGTH/2.0 - dMargin,                           - PITCH_WIDTH/2.0  + dMargin ),             VecPosition( - PITCH_LENGTH/2.0 + dMargin,                           + PITCH_WIDTH/2.0  - dMargin )              ).isInside( pos );}/*! This method returns whether the position 'pos' is before the opp goal. */bool WorldModel::isBeforeGoal( VecPosition pos ){  return Rect(             VecPosition( + PENALTY_X - 2,    - ( SS->getGoalWidth()/2.0 + 1)),             VecPosition( + PITCH_LENGTH/2.0, + ( SS->getGoalWidth()/2.0 + 1))             ).isInside( pos );}/*! This method determine the strategic position for the specified object. This    is done using the Formations class. In this class all information    about the current formation, player number in formation and otheic    values are stored. The strategic position is based on the position of    the ball. If the confidence in the position of the ball is lower than the    threshold defined in PlayerSettings, it is assumed that the ball is at    position (0,0).    \param obj for which the strategic position should be calculated.    \param ft formation for which to calculate the strategic position    \return VecPosition strategic position for player 'iPlayer' */VecPosition WorldModel::getStrategicPosition( ObjectT obj, FormationT ft ){  return getStrategicPosition( SoccerTypes::getIndex( obj ), ft );}  /*! This method determine the strategic position for the specified player. This    is done using the Formations class. In this class all information    about the current formation, player number in formation and otheic    values are stored. The strategic position is based on the position of    the ball. If the confidence in the position of the ball is lower than the    threshold defined in PlayerSettings, it is assumed that the ball is at    position (0,0).    \param iPlayer role in formation for which strategic position should be      returnd. With default value is -1 it is assumed that the strategic      position of the agent itself should be returned.    \param ft formation for which to calculate the strategic position    \return VecPosition strategic position for player 'iPlayer' */VecPosition WorldModel::getStrategicPosition( int iPlayer, FormationT ft ){  if( iPlayer > MAX_TEAMMATES )    cerr << "WM:getStrategicPosition with player nr " << iPlayer << endl;  VecPosition pos, posBall = getBallPos();  bool bOwnBall = isBallInOurPossesion();  // -1 is default -> get player number in formation  if( iPlayer == -1 )    iPlayer = formations->getPlayerInFormation();  // get maximal allowed x coordinate, this is offside x coordinate  double dMaxX = max( -0.5, getOffsideX() - 1.5 );  if( bOwnBall &&       getGlobalPosition(        SoccerTypes::getTeammateObjectFromIndex(iPlayer)).getX()       < posBall.getX() )    dMaxX = max( dMaxX, posBall.getX()  );  // after standing offside we are not allowed to move for ball  // with a goal kick of them we are not allowed to move into penalty area  if( isGoalKickThem() )    dMaxX = min( dMaxX, PENALTY_X - 1.0 );  else if( isBeforeKickOff() )    dMaxX = min( dMaxX, -2.0 );  else if ( isOffsideUs() )    dMaxX = posBall.getX() - 0.5;  // change the ball position on which strategic position is based  // depending on the different deadball situation and thus the  // expected movement of the ball  if( isBeforeKickOff() )    posBall.setVecPosition( 0, 0 );  else if( isGoalKickUs() ||      getTimeSinceLastCatch(  ) < PS->getCyclesCatchWait() + 5  ||      ( isFreeKickUs() && posBall.getX() < - PENALTY_X ) )    posBall.setX( -PITCH_LENGTH/4 + 5.0 );  else if( getConfidence( OBJECT_BALL ) < PS->getBallConfThr() )    posBall.setVecPosition( 0.0, 0.0 );  else if( isGoalKickThem() ||           ( isFreeKickThem() && posBall.getX() > PENALTY_X ) )    posBall.setX( PENALTY_X - 10.0 );  else if( isFreeKickThem() )    posBall.setX( posBall.getX() - 5.0 );  else if( isBallInOurPossesion() &&            !( isDeadBallUs() || isDeadBallThem() ) )    posBall.setX( posBall.getX() + 5.0 );  else if( posBall.getX() < - PENALTY_X + 5.0 )    posBall = predictPosAfterNrCycles( OBJECT_BALL, 3 );  // get the strategic position  pos = formations->getStrategicPosition( iPlayer, posBall, dMaxX,                          bOwnBall, PS->getMaxYPercentage(),					  ft );  return pos;}/*! This method returns a global position on the field which denotes    the position to mark position 'pos'. It receives three arguments:    a position pos (usually an opponent) that the agent wants to mark,    a distance 'dDist' representing the desired distance between o and    the marking position and a type indicator that denotes the type of    marking that is required. We distinguish three types of marking: -    MARK BALL: marking the opponent by standing at a distance 'dDist'    away from him on the line between him and the ball. This type of    marking will make it di眂ult for the opponent to receive a pass.    - MARK GOAL: marking the opponent by standing at a distance    'dDist' away from him on the line between him and the center point    of the goal he attacks. This type of marking will make it    difficult for the opponent to score a goal.  - MARK BISECTOR:    marking the opponent by standing at a distance 'dDist' away from    him on the bisector of the ball-opponent-goal angle. This type of    marking enables the agent to intercept both a direct and a leading    pass to the opponent.  \param pos position that has to be marked    \param dDist distance marking position is located from object    position \param mark marking technique that should be used \return    position that is the marking position. */VecPosition WorldModel::getMarkingPosition( VecPosition pos, double dDist, 					    MarkT mark){  VecPosition posBall  = getBallPos();    //edictPosAfterNrCycles( OBJECT_BALL, 3 );  VecPosition posGoal  = getPosOwnGoal( );  if( posBall.getX() < - PITCH_LENGTH/2.0 + 10.0 )    posGoal.setX( posBall.getX() + 1  );  else if( posBall.getX() > -PITCH_LENGTH/3.0 )  {    posGoal.setX( -PITCH_LENGTH/2.0 );    double dY  = posBall.getY();    if( fabs( dY ) > 12 )      dY += ( sign( dY ) > 0   ) -5 ? : 5 ;    posGoal.setY( dY );  }        VecPosition posAgent = getAgentGlobalPosition();  VecPosition posMark;  AngDeg      ang, angToGoal, angToBall;  if( mark == MARK_GOAL )                       // position in direction goal  {       angToGoal = (posGoal-pos).getDirection( );        Line line = Line::makeLineFromTwoPoints( pos, posGoal );    // we want to know when distance from ball to point p equals distance    // from opp to point p :    // d1 + d3 = sqrt(d2^2 + d3^2) > (d1+d3)^2 = d2^2 + d3^2 =>    // d1^2 + 2*d1*d3 = d2^2 -> d3 = (d2^2 - d1^2 ) / 2*d1    double dCalcDist;    VecPosition posIntersect = line.getPointOnLineClosestTo( posAgent );    double dDistAgent = posIntersect.getDistanceTo( posAgent );    double dDistOpp = posIntersect.getDistanceTo( pos );    dCalcDist = (dDistAgent*dDistAgent-dDistOpp*dDistOpp)/(2*dDistOpp);    double dExtra = 2.0;    //    if( posBall.getX() <  PENALTY_X + 5 )    if( pos.getDistanceTo(posAgent) < 5 )      dExtra = 0.0;    dCalcDist += dDistOpp + dExtra;    Log.log( 513, "dDistOpp %f dDistAgent %f calc %f min %f",	     dDistOpp, dDistAgent, dCalcDist, 0.75*pos.getDistanceTo(posGoal));    dCalcDist = min( dCalcDist, 0.75*pos.getDistanceTo( posGoal ) );    double x = -PITCH_LENGTH/2 + 4;    double y = line.getYGivenX( x);    posMark = pos + VecPosition( dCalcDist, angToGoal, POLAR );    if( posMark.getX() < x )      {	Log.log( 513, "change posmark to (%f,%f)", x, y );	posMark.setVecPosition( x, y );      }    // if interception point iss outside range or very close to marking    // point, but far away from opp (is this possible?) move closer.    if( ! line.isInBetween( posMark, pos, posGoal ) ||	( posMark.getDistanceTo( posAgent ) < 1.5 &&	  posMark.getDistanceTo( pos ) > 2*dDist ) )    {      Log.log( 513, "set marking position at dDist %f", min(dDistAgent,7.0) );      posMark   = pos + VecPosition( min( dDistAgent, 7.0 ), angToGoal, POLAR );    }    Log.log( 513, "marking position calc (%f,%f) pos(%f,%f) calcdist %f", 	     posMark.getX(), posMark.getY(), pos.getX(), pos.getY(), 	     dCalcDist );  }  else if( mark == MARK_BALL )                  // position in direction ball  {    angToBall = (posBall-pos).getDirection( );    posMark   = pos + VecPosition( dDist, angToBall, POLAR );  }  else if( mark == MARK_BISECTOR )             // pos between ball and goal  {    angToBall = (posBall - pos).getDirection( );    angToGoal = (posGoal - pos).getDirection( );    ang       = getBisectorTwoAngles( angToBall, angToGoal );    posMark   = pos + VecPosition( dDist, ang ,POLAR );  }  if( fabs( posMark.getX() ) > PITCH_LENGTH/2.0 - 2.0 )    posMark.setX( sign(posMark.getX())*(PITCH_LENGTH/2.0 - 2.0) );  return posMark;}/*! The actual power with which the ball is kicked depends on the    relative location of the ball to the player. The kick is more    powerful when the ball is very close to and in front of the player.    The actual kickpowerrate with which the power of the kick command    is multiplied is equal to<BR>    KickPowerRate*(1 - 0.25*DirDiff / 180 -    0.25*(DistBall-PlayerSize-BallSize)/KickableMargin)<BR>    with DirDiff = global angle of the ball rel to the body dir agent<BR>         DistBall = the distance from the center of the player to the ball<BR>    See soccermanual    \return the actual kick power rate with which power is multiplied  */double WorldModel::getActualKickPowerRate( ){ // true indicates that relative angle to body should be returned double dir_diff      = fabs( getRelativeAngle( OBJECT_BALL, true ) ); double dist          = getRelativeDistance( OBJECT_BALL ) -                        SS->getPlayerSize( ) - SS->getBallSize( ); return SS->getKickPowerRate() *          ( 1 - 0.25 * dir_diff/180.0 - 0.25 * dist / SS->getKickableMargin());}/*! The actual power with which the ball must be kicked depends on the    relative location of the ball to the player. The kick is more    powerful when the ball is very close to and in front of the player.    The actual power with which the ball must be kicked is equal to<BR>    Speed / KickPowerRate*(1 - 0.25*DirDiff / 180 -    0.25*(DistBall-PlayerSize-BallSize)/KickableMargin)<BR>    with DirDiff = global angle of the ball rel to the body dir agent<BR>         DistBall = the distance from the center of the player to the ball<BR>    See soccermanual for further information.    This method receives a speed vector which the ball should have after the    kick command and calculates the power for the kick command to reach this.    This value can be higher than is possible to shoot!    \param dDesiredSpeed the desired speed after the kick command    \return the actual power for kick command to get dDesiredSpeed */double WorldModel::getKickPowerForSpeed( double dDesiredSpeed ){  // acceleration after kick is calculated by power * eff_kick_power_rate  // so actual kick power is acceleration / eff_kick_power_rate  return dDesiredSpeed / getActualKickPowerRate( );}/*! This method determines the power with which the ball must be kicked in    order to travel a given distance and still have a speed after that    distance    \param dDistance distance ball should travel    \param dEndSpeed speed ball should have at target position    \return power value for kick command */double WorldModel::getKickSpeedToTravel( double dDistance, double dEndSpeed ){  // if endspeed is zero we have an infinite series and return the first term  // that corresponds to the distance that has to be travelled.  if( dEndSpeed < 0.0001  )    return Geometry::getFirstInfGeomSeries(dDistance, SS->getBallDecay() );  /

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲天堂精品视频| 亚洲精品成人少妇| 欧美性猛交xxxx黑人交| 色屁屁一区二区| 蜜桃一区二区三区在线| 国产精品电影一区二区| 欧美成人一区二区三区片免费 | 樱桃国产成人精品视频| 日韩欧美高清在线| 欧美性videosxxxxx| bt7086福利一区国产| 美女一区二区久久| 亚洲国产另类av| 国产精品不卡在线| 久久亚洲综合色| 91麻豆精品国产91久久久久久 | 成人高清av在线| 免费在线欧美视频| 午夜伊人狠狠久久| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 日韩免费观看高清完整版 | 国产一区在线视频| 五月天激情小说综合| 一区二区三区免费| 国产精品丝袜一区| 久久精品一区二区三区不卡| 亚洲美女在线一区| 国产精品欧美一区二区三区| 欧美精品一区二区三区四区| 欧美一区二区成人6969| 欧美色精品天天在线观看视频| av中文字幕在线不卡| 成人丝袜高跟foot| 成人精品一区二区三区四区| 国产乱子轮精品视频| 毛片av一区二区三区| 免费观看在线综合色| 日韩激情一区二区| 婷婷开心激情综合| 日韩av午夜在线观看| 亚洲18色成人| 日韩专区欧美专区| 日本大胆欧美人术艺术动态| 免费观看日韩av| 久久se这里有精品| 国产美女精品一区二区三区| 紧缚捆绑精品一区二区| 国产一区激情在线| 国产精品456| 成人精品视频.| 91一区在线观看| 91九色最新地址| 欧美日韩免费电影| 欧美一区午夜视频在线观看| 日韩一区二区三区观看| 日韩三级伦理片妻子的秘密按摩| 欧美videos中文字幕| 久久久久久久综合日本| 国产精品嫩草久久久久| 亚洲人成伊人成综合网小说| 一区二区三区**美女毛片| 亚洲福利一区二区三区| 蜜臀a∨国产成人精品| 国产在线精品一区在线观看麻豆| 国产成人精品网址| 91在线观看污| 欧美人体做爰大胆视频| 欧美精品一区二区三区蜜桃 | 99久久综合精品| 欧美在线视频不卡| 日韩欧美国产麻豆| 国产婷婷色一区二区三区| 国内精品视频666| 丰满亚洲少妇av| 欧美性受xxxx| 精品国产区一区| 国产精品福利一区| 日韩黄色小视频| 大美女一区二区三区| 色婷婷综合久久久中文字幕| 欧美一区二区国产| 亚洲欧洲精品一区二区精品久久久| 亚洲激情图片一区| 国内精品不卡在线| 一本色道久久综合亚洲精品按摩| 欧美精品粉嫩高潮一区二区| 久久精品视频免费| 亚洲成人动漫精品| 高清视频一区二区| 日韩一区二区免费高清| 专区另类欧美日韩| 欧美a级理论片| 色综合av在线| 久久精品一区八戒影视| 午夜欧美一区二区三区在线播放| 国产一区二区电影| 欧美日韩另类一区| 中文字幕欧美日韩一区| 日日噜噜夜夜狠狠视频欧美人 | 另类综合日韩欧美亚洲| 北条麻妃一区二区三区| 欧美一区二区三区在线| 国产精品黄色在线观看| 日本美女一区二区三区| 色综合久久中文综合久久牛| 久久精品男人天堂av| 一区二区三区欧美激情| 成人午夜视频在线观看| 日韩你懂的在线播放| 亚洲二区在线视频| 99re在线精品| 国产亚洲欧美色| 青青草原综合久久大伊人精品| 91精彩视频在线观看| 国产精品久线在线观看| 国产精品一区三区| 精品人在线二区三区| 亚洲国产精品自拍| 色婷婷激情久久| 中文字幕日本不卡| 成人综合在线观看| 久久精品男人天堂av| 九九热在线视频观看这里只有精品| 91久久一区二区| **性色生活片久久毛片| 成人免费不卡视频| 欧美国产欧美综合| 国产精品一区二区x88av| 欧美成人一区二区三区| 午夜精品久久久久久久99水蜜桃| 一本一道综合狠狠老| 国产精品国产三级国产普通话蜜臀 | 久久99在线观看| 日韩一区二区不卡| 丝袜亚洲另类丝袜在线| 欧美群妇大交群中文字幕| 亚洲精品va在线观看| 色婷婷激情久久| 尤物av一区二区| 欧美在线制服丝袜| 亚洲成人777| 欧美欧美午夜aⅴ在线观看| 亚洲一级不卡视频| 欧美中文字幕一区二区三区 | 国产成人免费在线观看| 久久久亚洲精品一区二区三区 | 亚洲五码中文字幕| 欧美日韩精品欧美日韩精品| 亚洲妇女屁股眼交7| 欧美日本高清视频在线观看| 日韩电影免费一区| 欧美xxxx老人做受| 国产毛片精品视频| 国产精品全国免费观看高清| av亚洲产国偷v产偷v自拍| 国产精品灌醉下药二区| 色悠悠亚洲一区二区| 亚洲成av人片在线观看无码| 91精品国产91久久久久久一区二区| 日本中文字幕一区二区有限公司| 欧美成人欧美edvon| 国产精品白丝jk白祙喷水网站| 亚洲欧洲在线观看av| 欧美日韩免费观看一区二区三区 | 精品一区二区三区免费| 欧美激情在线一区二区三区| 97se亚洲国产综合在线| 亚洲综合一区二区精品导航| 欧美一区国产二区| 国产福利一区在线| 亚洲精品成人a在线观看| 91精品在线一区二区| 国产乱码一区二区三区| 亚洲精品一二三四区| 欧美一级在线免费| 成人aaaa免费全部观看| 无码av中文一区二区三区桃花岛| 精品国产免费久久| 91在线观看高清| 久久99久久精品| 亚洲精品福利视频网站| 精品国产精品网麻豆系列| jlzzjlzz亚洲日本少妇| 日产精品久久久久久久性色| 国产女人水真多18毛片18精品视频 | 欧美日韩第一区日日骚| 国产一区二区伦理片| 亚洲精品日韩综合观看成人91| 欧美一区二区播放| 色婷婷综合久久久久中文一区二区 | 亚洲视频免费看| 日韩欧美激情一区| 色婷婷av一区二区| 精品一区二区影视| 亚洲亚洲人成综合网络| 国产拍欧美日韩视频二区| 911精品产国品一二三产区| www.日韩大片| 国产一区二区毛片| 日本欧美加勒比视频|