classvecposition.html
来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 1,105 行 · 第 1/5 页
HTML
1,105 行
<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"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method converts the coordinates of the current VecPosition (which are represented in an global coordinate system with the origin at (0,0)) into relative coordinates in a different coordinate system (e.g. relative to a player). The new coordinate system is defined by the arguments to the method. The relative coordinates are now obtained by aligning the relative coordinate system with the global coordinate system using a translation to make both origins coincide followed by a rotation to align the axes. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>origin</em> </td><td>the origin of the relative coordinate frame </td></tr><tr><td valign=top><em>ang</em> </td><td>the angle between the world frame and the relative frame (reasoning from the world frame) </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>the result of converting the current global VecPosition into a relative VecPosition </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00804">804</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>, and <a class="el" href="Geometry_8C-source.html#l00783">rotate</a>().<p>Referenced by <a class="el" href="WorldModelUpdate_8C-source.html#l01386">WorldModel::checkParticlesBall</a>(), and <a class="el" href="WorldModelUpdate_8C-source.html#l00896">WorldModel::updateObjectRelativeFromGlobal</a>(). </td> </tr></table><a name="a37" doxytag="VecPosition::isBehindOf"></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"> bool VecPosition::isBehindOf </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const double & </td> <td class="mdname1" valign="top" nowrap> <em>d</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method determines whether the x-coordinate of the current VecPosition is behind (i.e. smaller than) a given double value. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>d</em> </td><td>a double value to which the current x-coordinate must be compared </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>true when the current x-coordinate is behind the given value; false otherwise </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00667">667</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>. </td> </tr></table><a name="a36" doxytag="VecPosition::isBehindOf"></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"> bool VecPosition::isBehindOf </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const VecPosition & </td> <td class="mdname1" valign="top" nowrap> <em>p</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method determines whether the current VecPosition is behind a given VecPosition, i.e. whether the x-coordinate of the current VecPosition is smaller than the x-coordinate of the given VecPosition. <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 to which the current VecPosition must be compared </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>true when the current VecPosition is behind the given VecPosition; false otherwise </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00657">657</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8C-source.html#l00542">getX</a>(), and <a class="el" href="Geometry_8h-source.html#l00103">m_x</a>.<p>Referenced by <a class="el" href="Geometry_8C-source.html#l00721">isBetweenX</a>(). </td> </tr></table><a name="a43" doxytag="VecPosition::isBetweenX"></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"> bool VecPosition::isBetweenX </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const double & </td> <td class="mdname" nowrap> <em>d1</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const double & </td> <td class="mdname" nowrap> <em>d2</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 determines whether the x-coordinate of the current VecPosition is in between two given double values, i.e. whether the x-coordinate of the current VecPosition is in front of the first argument and behind the second. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>d1</em> </td><td>a double value to which the current x-coordinate must be compared </td></tr><tr><td valign=top><em>d2</em> </td><td>a double value to which the current x-coordinate must be compared </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>true when the current x-coordinate is in between the two given values; false otherwise </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00733">733</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8C-source.html#l00657">isBehindOf</a>(), and <a class="el" href="Geometry_8C-source.html#l00636">isInFrontOf</a>(). </td> </tr></table><a name="a42" doxytag="VecPosition::isBetweenX"></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"> bool VecPosition::isBetweenX </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const VecPosition & </td> <td class="mdname" nowrap> <em>p1</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const VecPosition & </td> <td class="mdname" nowrap> <em>p2</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 determines whether the current VecPosition is in between two given VecPositions when looking in the x-direction, i.e. whether the current VecPosition is in front of the first argument and behind the second. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>p1</em> </td><td>a VecPosition to which the current VecPosition must be compared </td></tr><tr><td valign=top><em>p2</em> </td><td>a VecPosition to which the current VecPosition must be compared </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?