classbasicplayer.html
来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 758 行 · 第 1/5 页
HTML
758 行
<tr> <td class="md" nowrap valign="top"> <a class="el" href="classSoccerCommand.html">SoccerCommand</a> BasicPlayer::catchBall </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This skill enables an agent to catch the ball and can only be executed when the agent is a goalkeeper. It returns a catch command that takes the angle of the ball relative to the body of the agent as its only argument. The correct value for this argument is computed by determining the global direction between the current ball position and the agent's current position and by making this direction relative to the agent's global body angle. <dl compact><dt><b>Returns: </b><dd><a class="el" href="classSoccerCommand.html">SoccerCommand</a> to catch the ball </dl><p>Definition at line <a class="el" href="BasicPlayer_8C-source.html#l00349">349</a> of file <a class="el" href="BasicPlayer_8C-source.html">BasicPlayer.C</a>.<p>References <a class="el" href="namespace_3globalScope_4.html#a247a185">CMD_CATCH</a>, <a class="el" href="WorldModel_8C-source.html#l00734">WorldModel::getRelativeAngle</a>(), <a class="el" href="namespace_3globalScope_4.html#a240a24">OBJECT_BALL</a>, and <a class="el" href="BasicPlayer_8h-source.html#l00058">WM</a>.<p>Referenced by <a class="el" href="Player_8C-source.html#l00278">Player::deMeer5_goalie</a>(). </td> </tr></table><a name="b26" doxytag="BasicPlayer::clearBall"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classSoccerCommand.html">SoccerCommand</a> BasicPlayer::clearBall </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="SoccerTypes_8h.html#a255">ClearBallT</a> </td> <td class="mdname" nowrap> <em>type</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="SoccerTypes_8h.html#a246">SideT</a> </td> <td class="mdname" nowrap> <em>s</em> = SIDE_ILLEGAL, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="Geometry_8h.html#a2">AngDeg</a> * </td> <td class="mdname" nowrap> <em>angMax</em> = NULL</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This skill enables an agent to clear the ball to a certain area on the field. It is useful, for example, when a defender cannot dribble or pass the ball to a teammate in a dangerous situation. Using this skill he can then kick the ball up the field away from the defensive zone. It is important to realize that this skill is only called when the agent has no alternative options in the current situation. Clearing the ball amounts to kicking it with maximum power into the widest angle between opponents in a certain area. The shooting direction is determined using the function which returns the direction of the bisector of this widest angle. The area on the field from which this angle is selected depends on the type of clear which is supplied as an argument to this skill. We distinguish three types of clearing:<ul><li>CLEAR BALL DEFENSIVE: clearing the ball away from the defensive zone into a triangular area which is defined by the current ball position and the center line on the field.<li>CLEAR BALL OFFENSIVE: clearing the ball towards the offensive zone into a triangular area which is defined by the current ball position and the line segment that coincides with the front line of the opponent's penalty area and extends to the left and right side lines.<li>CLEAR BALL GOAL: clearing the ball into a triangular area in front of the opponent's goal which is defined by the current ball position and the line segment that runs from the center of the opponent's goal to the center of the front line of the penalty area. </ul><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>type</em> </td><td>type of the clear ball skill </td></tr><tr><td valign=top><em>s</em> </td><td>if specified indicates the part of the field the clearBall should be directed to. </td></tr><tr><td valign=top><em>angMax</em> </td><td>if specified (and not NULL) will be filled with the angle between the opponents in the direction in which will be shot </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd><a class="el" href="classSoccerCommand.html">SoccerCommand</a> kick command to clear the ball </dl><p>Definition at line <a class="el" href="BasicPlayer_8C-source.html#l01375">1375</a> of file <a class="el" href="BasicPlayer_8C-source.html">BasicPlayer.C</a>.<p>References <a class="el" href="Geometry_8h-source.html#l00052">AngDeg</a>, <a class="el" href="namespace_3globalScope_4.html#a255a238">CLEAR_BALL_DEFENSIVE</a>, <a class="el" href="namespace_3globalScope_4.html#a255a239">CLEAR_BALL_GOAL</a>, <a class="el" href="namespace_3globalScope_4.html#a255a237">CLEAR_BALL_OFFENSIVE</a>, <a class="el" href="SoccerTypes_8h-source.html#l00390">ClearBallT</a>, <a class="el" href="namespace_3globalScope_4.html#a247a180">CMD_ILLEGAL</a>, <a class="el" href="WorldModel_8C-source.html#l00620">WorldModel::getBallPos</a>(), <a class="el" href="ServerSettings_8C-source.html#l01056">ServerSettings::getBallSpeedMax</a>(), <a class="el" href="PlayerSettings_8C-source.html#l00248">PlayerSettings::getClearBallDist</a>(), <a class="el" href="PlayerSettings_8C-source.html#l00266">PlayerSettings::getClearBallOppMaxDist</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00874">WorldModel::getDirectionOfWidestAngle</a>(), <a class="el" href="Geometry_8C-source.html#l01278">Line::getIntersection</a>(), <a class="el" href="Geometry_8C-source.html#l00542">VecPosition::getX</a>(), <a class="el" href="Geometry_8C-source.html#l00558">VecPosition::getY</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00775">kickTo</a>(), <a class="el" href="Geometry_8C-source.html#l01475">Line::makeLineFromPositionAndAngle</a>(), <a class="el" href="Geometry_8C-source.html#l01447">Line::makeLineFromTwoPoints</a>(), <a class="el" href="SoccerTypes_8h-source.html#l00080">PENALTY_X</a>, <a class="el" href="SoccerTypes_8h-source.html#l00075">PITCH_LENGTH</a>, <a class="el" href="SoccerTypes_8h-source.html#l00076">PITCH_WIDTH</a>, <a class="el" href="BasicPlayer_8h-source.html#l00060">PS</a>, <a class="el" href="Geometry_8C-source.html#l00572">VecPosition::setVecPosition</a>(), <a class="el" href="Geometry_8C-source.html#l00550">VecPosition::setY</a>(), <a class="el" href="namespace_3globalScope_4.html#a246a177">SIDE_LEFT</a>, <a class="el" href="namespace_3globalScope_4.html#a246a178">SIDE_RIGHT</a>, <a class="el" href="SoccerTypes_8h-source.html#l00287">SideT</a>, <a class="el" href="BasicPlayer_8h-source.html#l00059">SS</a>, and <a class="el" href="BasicPlayer_8h-source.html#l00058">WM</a>. </td> </tr></table><a name="b10" doxytag="BasicPlayer::communicate"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classSoccerCommand.html">SoccerCommand</a> BasicPlayer::communicate </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This skill enables an agent to communicate with other players on the field. It receives a string message as its only argument and returns a say command that causes the message to be broadcast to all players within a certain distance from the speaker. <dl compact><dt><b>Returns: </b><dd><a class="el" href="classSoccerCommand.html">SoccerCommand</a> to say the specified string 'str' </dl><p>Definition at line <a class="el" href="BasicPlayer_8C-source.html#l00361">361</a> of file <a class="el" href="BasicPlayer_8C-source.html">BasicPlayer.C</a>.<p>References <a class="el" href="namespace_3globalScope_4.html#a247a189">CMD_SAY</a>. </td> </tr></table><a name="b5" doxytag="BasicPlayer::dashToPoint"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classSoccerCommand.html">SoccerCommand</a> BasicPlayer::dashToPoint </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classVecPosition.html">VecPosition</a> </td> <td class="mdname1" valign="top" nowrap> <em>pos</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?