classvecposition.html
来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 1,105 行 · 第 1/5 页
HTML
1,105 行
<td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> double VecPosition::getMagnitude </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method determines the magnitude (length) of the vector corresponding with the current VecPosition using the formula of Pythagoras. <dl compact><dt><b>Returns: </b><dd>the length of the vector corresponding with the current VecPosition </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00614">614</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8h-source.html#l00103">m_x</a>, and <a class="el" href="Geometry_8h-source.html#l00104">m_y</a>.<p>Referenced by <a class="el" href="BasicPlayer_8C-source.html#l00314">BasicPlayer::accelerateBallToVelocity</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l00917">WorldModel::calculateStateAgent</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01254">WorldModel::calculateStateBall</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01947">WorldModel::calculateStateBall2</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01558">WorldModel::calculateStatePlayer</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01386">WorldModel::checkParticlesBall</a>(), <a class="el" href="WorldModel_8C-source.html#l00627">WorldModel::getBallSpeed</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00148">WorldModel::getClosestInSetTo</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00391">WorldModel::getFurthestInSetTo</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01611">BasicPlayer::getInterceptionPointBall</a>(), <a class="el" href="Objects_8C-source.html#l00073">Object::getRelativeDistance</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00302">WorldModel::getSecondClosestInSetTo</a>(), <a class="el" href="Objects_8C-source.html#l00341">DynamicObject::getSpeed</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00269">BasicPlayer::kickBallCloseToBody</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00775">BasicPlayer::kickTo</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01702">WorldModel::mapUnknownPlayers</a>(), <a class="el" href="WorldModelPredict_8C-source.html#l00200">WorldModel::predictPosAfterNrCycles</a>(), <a class="el" href="WorldModelPredict_8C-source.html#l00142">WorldModel::predictStateAfterDash</a>(), <a class="el" href="WorldModelPredict_8C-source.html#l00178">WorldModel::predictStateAfterTurn</a>(), <a class="el" href="Geometry_8C-source.html#l00783">rotate</a>(), <a class="el" href="Objects_8C-source.html#l00320">DynamicObject::setGlobalVelocity</a>(), <a class="el" href="Geometry_8C-source.html#l00602">setMagnitude</a>(), <a class="el" href="Objects_8C-source.html#l00639">BallObject::show</a>(), <a class="el" href="Objects_8C-source.html#l00266">FixedObject::show</a>(), <a class="el" href="Geometry_8C-source.html#l00504">show</a>(), <a class="el" href="Geometry_8C-source.html#l00518">str</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l00659">WorldModel::updateAgentAndBallAfterSense</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l00781">WorldModel::updateBallAfterKick</a>(), and <a class="el" href="WorldModelUpdate_8C-source.html#l01481">WorldModel::updateParticlesBall</a>(). </td> </tr></table><a name="d0" doxytag="VecPosition::getVecPositionFromPolar"></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"> VecPosition VecPosition::getVecPositionFromPolar </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">double </td> <td class="mdname" nowrap> <em>dMag</em>, </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>ang</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method converts a polar representation of a VecPosition into a Cartesian representation. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>dMag</em> </td><td>a double representing the polar r-coordinate, i.e. the distance from the point to the origin </td></tr><tr><td valign=top><em>ang</em> </td><td>the angle that the polar vector makes with the x-axis, i.e. the polar phi-coordinate </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>the result of converting the given polar representation into a Cartesian representation thus yielding a Cartesian VecPosition </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00865">865</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8h-source.html#l00052">AngDeg</a>, <a class="el" href="Geometry_8C-source.html#l00103">cosDeg</a>(), <a class="el" href="Geometry_8C-source.html#l00112">sinDeg</a>(), and <a class="el" href="Geometry_8C-source.html#l00231">VecPosition</a>().<p>Referenced by <a class="el" href="WorldModelPredict_8C-source.html#l00142">WorldModel::predictStateAfterDash</a>(), and <a class="el" href="Geometry_8C-source.html#l00572">setVecPosition</a>(). </td> </tr></table><a name="a50" doxytag="VecPosition::getVecPositionOnLineFraction"></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"> VecPosition VecPosition::getVecPositionOnLineFraction </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">VecPosition & </td> <td class="mdname" nowrap> <em>p</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>double </td> <td class="mdname" nowrap> <em>dFrac</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method returns a VecPosition that lies somewhere on the vector between the current VecPosition and a given VecPosition. The desired position is specified by a given fraction of this vector (e.g. 0.5 means exactly in the middle of the vector). The current VecPosition itself is left unchanged. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>p</em> </td><td>a VecPosition which defines the vector to the current VecPosition </td></tr><tr><td valign=top><em>dFrac</em> </td><td>double representing the fraction of the connecting vector at which the desired VecPosition lies. </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>the VecPosition which lies at fraction dFrac on the vector connecting p and the current VecPosition </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00847">847</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>Referenced by <a class="el" href="Geometry_8C-source.html#l01174">Circle::getIntersectionArea</a>(). </td> </tr></table><a name="a26" doxytag="VecPosition::getX"></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"> double VecPosition::getX </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get method for the x-coordinate of the current VecPosition. <dl compact><dt><b>Returns: </b><dd>the x-coordinate of the current VecPosition </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00542">542</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>Referenced by <a class="el" href="Player_8C-source.html#l00665">Player::amIAgentToSaySomething</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01120">WorldModel::averageParticles</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01212">WorldModel::calculateAngleAgentWithPos</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01159">WorldModel::calculatePosAgentWith2Flags</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01874">WorldModel::calculateStateAgent2</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01947">WorldModel::calculateStateBall2</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01386">WorldModel::checkParticlesBall</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01375">BasicPlayer::clearBall</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01521">BasicPlayer::defendGoalLine</a>(), <a class="el" href="Player_8C-source.html#l00182">Player::deMeer5</a>(), <a class="el" href="Player_8C-source.html#l00278">Player::deMeer5_goalie</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01070">BasicPlayer::dribble</a>(), <a class="el" href="Geometry_8C-source.html#l01320">Line::getCircleIntersectionPoints</a>(), <a class="el" href="SoccerTypes_8C-source.html#l01308">SoccerTypes::getGlobalPositionFlag</a>(), <a class="el" href="Geometry_8C-source.html#l01120">Circle::getIntersectionPoints</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00786">WorldModel::getOffsideX</a>(), <a class="el" href="WorldModel_8C-source.html#l00835">WorldModel::getOppGoalieType</a>(), <a class="el" href="WorldModel_8C-source.html#l00873">WorldModel::getOwnGoalieType</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l01126">WorldModel::getPowerForDash</a>(), <a class="el" href="Player_8C-source.html#l00434">Player::getStrategicPosition</a>(), <a class="el" href="Formations_8C-source.html#l00488">Formations::getStrategicPosition</a>(), <a class="el" href="Geometry_8C-source.html#l01370">Line::getTangentLine</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00619">WorldModel::isBallHeadingToGoal</a>(), <a class="el" href="Geometry_8C-source.html#l00657">isBehindOf</a>(), <a class="el" href="Geometry_8C-source.html#l00636">isInFrontOf</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00675">WorldModel::isInOwnPenaltyArea</a>(), <a class="el" href="Geometry_8C-source.html#l01542">Rectangle::isInside</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00692">WorldModel::isInTheirPenaltyArea</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00733">WorldModel::isOnside</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00269">BasicPlayer::kickBallCloseToBody</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00775">BasicPlayer::kickTo</a>(), <a class="el" href="WorldModel_8C-source.html#l01279">WorldModel::logObjectInformation</a>(), <a class="el" href="Geometry_8C-source.html#l01447">Line::makeLineFromTwoPoints</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00962">BasicPlayer::moveToPosAlongLine</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01271">BasicPlayer::outplayOpponent</a>(), <a class="el" href="Player_8C-source.html#l00707">Player::sayWorldStatus</a>(), <a class="el" href="Geometry_8C-source.html#l01522">Rectangle::setRectanglePoints</a>(), <a class="el" href="Geometry_8C-source.html#l00518">str</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00370">BasicPlayer::teleportToPos</a>(), and <a class="el" href="WorldModelUpdate_8C-source.html#l01096">WorldModel::updateParticlesAgent</a>(). </td> </tr></table><a name="a28" doxytag="VecPosition::getY"></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"> double VecPosition::getY </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get method for the y-coordinate of the current VecPosition. <dl compact><dt><b>Returns: </b><dd>the y-coordinate of the current VecPosition </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00558">558</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>Referenced by <a class="el" href="BasicPlayer_8C-source.html#l00314">BasicPlayer::accelerateBallToVelocity</a>(), <a class="el" href="Player_8C-source.html#l00665">Player::amIAgentToSaySomething</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01120">WorldModel::averageParticles</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01212">WorldModel::calculateAngleAgentWithPos</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01159">WorldModel::calculatePosAgentWith2Flags</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01874">WorldModel::calculateStateAgent2</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01947">WorldModel::calculateStateBall2</a>(), <a class="el" href="WorldModelUpdate_8C-source.html#l01386">WorldModel::checkParticlesBall</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01375">BasicPlayer::clearBall</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01521">BasicPlayer::defendGoalLine</a>(), <a class="el" href="Player_8C-source.html#l00278">Player::deMeer5_goalie</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01070">BasicPlayer::dribble</a>(), <a class="el" href="Geometry_8C-source.html#l01320">Line::getCircleIntersectionPoints</a>(), <a class="el" href="SoccerTypes_8C-source.html#l01308">SoccerTypes::getGlobalPositionFlag</a>(), <a class="el" href="Geometry_8C-source.html#l01120">Circle::getIntersectionPoints</a>(), <a class="el" href="WorldModel_8C-source.html#l00835">WorldModel::getOppGoalieType</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00825">WorldModel::getOuterPositionInField</a>(), <a class="el" href="WorldModel_8C-source.html#l00873">WorldModel::getOwnGoalieType</a>(), <a class="el" href="Formations_8C-source.html#l00488">Formations::getStrategicPosition</a>(), <a class="el" href="Geometry_8C-source.html#l01370">Line::getTangentLine</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00619">WorldModel::isBallHeadingToGoal</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00675">WorldModel::isInOwnPenaltyArea</a>(), <a class="el" href="Geometry_8C-source.html#l01542">Rectangle::isInside</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00692">WorldModel::isInTheirPenaltyArea</a>(), <a class="el" href="Geometry_8C-source.html#l00678">isLeftOf</a>(), <a class="el" href="Geometry_8C-source.html#l00699">isRightOf</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00269">BasicPlayer::kickBallCloseToBody</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00775">BasicPlayer::kickTo</a>(), <a class="el" href="WorldModel_8C-source.html#l01279">WorldModel::logObjectInformation</a>(), <a class="el" href="Geometry_8C-source.html#l01447">Line::makeLineFromTwoPoints</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01271">BasicPlayer::outplayOpponent</a>(), <a class="el" href="Player_8C-source.html#l00707">Player::sayWorldStatus</a>(), <a class="el" href="Geometry_8C-source.html#l01522">Rectangle::setRectanglePoints</a>(), <a class="el" href="Geometry_8C-source.html#l00518">str</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00370">BasicPlayer::teleportToPos</a>(), and <a class="el" href="WorldModelUpdate_8C-source.html#l01096">WorldModel::updateParticlesAgent</a>(). </td> </tr></table><a name="a48" doxytag="VecPosition::globalToRelative"></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"> VecPosition VecPosition::globalToRelative </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">VecPosition </td> <td class="mdname" nowrap> <em>origin</em>, </td> </tr> <tr> <td></td> <td></td>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?