soccertypes_8h-source.html
来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 520 行 · 第 1/4 页
HTML
520 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>SoccerTypes.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.2.12 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>SoccerTypes.h</h1><a href="SoccerTypes_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>00002 <font class="comment">Copyright (c) 2000,2001, Jelle Kok, University of Amsterdam</font>00003 <font class="comment">All rights reserved.</font>00004 <font class="comment"></font>00005 <font class="comment">Redistribution and use in source and binary forms, with or without </font>00006 <font class="comment">modification, are permitted provided that the following conditions are met:</font>00007 <font class="comment"></font>00008 <font class="comment">1. Redistributions of source code must retain the above copyright notice, this </font>00009 <font class="comment">list of conditions and the following disclaimer. </font>00010 <font class="comment"></font>00011 <font class="comment">2. Redistributions in binary form must reproduce the above copyright notice, </font>00012 <font class="comment">this list of conditions and the following disclaimer in the documentation </font>00013 <font class="comment">and/or other materials provided with the distribution. </font>00014 <font class="comment"></font>00015 <font class="comment">3. Neither the name of the University of Amsterdam nor the names of its </font>00016 <font class="comment">contributors may be used to endorse or promote products derived from this </font>00017 <font class="comment">software without specific prior written permission. </font>00018 <font class="comment"></font>00019 <font class="comment">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" </font>00020 <font class="comment">AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE </font>00021 <font class="comment">IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE </font>00022 <font class="comment">DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE </font>00023 <font class="comment">FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL </font>00024 <font class="comment">DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR </font>00025 <font class="comment">SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER </font>00026 <font class="comment">CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, </font>00027 <font class="comment">OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE </font>00028 <font class="comment">OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</font>00029 <font class="comment">*/</font>00049 <font class="preprocessor">#ifndef _SOCCERTYPES_</font>00050 <font class="preprocessor"></font><font class="preprocessor">#define _SOCCERTYPES_</font>00051 <font class="preprocessor"></font>00052 <font class="preprocessor">#include <iostream.h></font> <font class="comment">// needed for output stream.</font>00053 <font class="preprocessor">#include "<a class="code" href="Geometry_8h.html">Geometry.h</a>"</font> <font class="comment">// needed for AngDeg</font>00054 <font class="preprocessor">#include "<a class="code" href="ServerSettings_8h.html">ServerSettings.h</a>"</font>00055 00056 00057 <font class="comment">/******************************************************************************/</font>00058 <font class="comment">/********************** DEFINES ***********************************************/</font>00059 <font class="comment">/******************************************************************************/</font>00060 <a name="l00061"></a><a class="code" href="SoccerTypes_8h.html#a0">00061</a> <font class="preprocessor">#define MAX_TEAMMATES 11 </font><a name="l00062"></a><a class="code" href="SoccerTypes_8h.html#a1">00062</a> <font class="preprocessor">#define MAX_OPPONENTS 11 </font><a name="l00063"></a><a class="code" href="SoccerTypes_8h.html#a2">00063</a> <font class="preprocessor">#define MAX_PLAYER_TYPES 8 </font><a name="l00065"></a><a class="code" href="SoccerTypes_8h.html#a3">00065</a> <font class="preprocessor">#define MAX_FORMATION_TYPES 6 </font><a name="l00066"></a><a class="code" href="SoccerTypes_8h.html#a4">00066</a> <font class="preprocessor">#define MAX_HETERO_PLAYERS 7 </font><a name="l00067"></a><a class="code" href="SoccerTypes_8h.html#a5">00067</a> <font class="preprocessor">#define MAX_COMMANDS 10 </font><a name="l00068"></a><a class="code" href="SoccerTypes_8h.html#a6">00068</a> <font class="preprocessor">#define MAX_MSG 2048 </font><a name="l00069"></a><a class="code" href="SoccerTypes_8h.html#a7">00069</a> <font class="preprocessor">#define MAX_SAY_MSG 512 </font><a name="l00070"></a><a class="code" href="SoccerTypes_8h.html#a8">00070</a> <font class="preprocessor">#define MAX_TEAM_NAME_LENGTH 64 </font><a name="l00071"></a><a class="code" href="SoccerTypes_8h.html#a9">00071</a> <font class="preprocessor">#define MAX_FLAGS 55 </font><a name="l00072"></a><a class="code" href="SoccerTypes_8h.html#a10">00072</a> <font class="preprocessor">#define MAX_LINES 4 </font><a name="l00073"></a><a class="code" href="SoccerTypes_8h.html#a11">00073</a> <font class="preprocessor">#define DEFAULT_TEAM_NAME "Team_L" </font><a name="l00074"></a><a class="code" href="SoccerTypes_8h.html#a12">00074</a> <font class="preprocessor">#define DEFAULT_OPPONENT_NAME "Team_R" </font><a name="l00075"></a><a class="code" href="SoccerTypes_8h.html#a13">00075</a> <font class="preprocessor">#define PITCH_LENGTH 105.0 </font><a name="l00076"></a><a class="code" href="SoccerTypes_8h.html#a14">00076</a> <font class="preprocessor">#define PITCH_WIDTH 68.0 </font><a name="l00077"></a><a class="code" href="SoccerTypes_8h.html#a15">00077</a> <font class="preprocessor">#define PITCH_MARGIN 5.0 </font><a name="l00078"></a><a class="code" href="SoccerTypes_8h.html#a16">00078</a> <font class="preprocessor">#define PENALTY_AREA_LENGTH 16.5 </font><a name="l00079"></a><a class="code" href="SoccerTypes_8h.html#a17">00079</a> <font class="preprocessor">#define PENALTY_AREA_WIDTH 40.35 </font><a name="l00080"></a><a class="code" href="SoccerTypes_8h.html#a18">00080</a> <font class="preprocessor">#define PENALTY_X (PITCH_LENGTH/2.0-PENALTY_AREA_LENGTH) </font>00084 <font class="preprocessor"></font><font class="comment">/******************************************************************************/</font>00085 <font class="comment">/********************** CONSTANTS *********************************************/</font>00086 <font class="comment">/******************************************************************************/</font>00087 <a name="l00088"></a><a class="code" href="SoccerTypes_8h.html#a19">00088</a> <font class="keyword">const</font> <font class="keywordtype">double</font> <a class="code" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a> = -1000.0; <a name="l00089"></a><a class="code" href="SoccerTypes_8h.html#a20">00089</a> <font class="keyword">const</font> <a class="code" href="Geometry_8h.html#a2">AngDeg</a> <a class="code" href="SoccerTypes_8h.html#a20">UnknownAngleValue</a> = -1000.0; <a name="l00090"></a><a class="code" href="SoccerTypes_8h.html#a21">00090</a> <font class="keyword">const</font> <font class="keywordtype">int</font> <a class="code" href="SoccerTypes_8h.html#a21">UnknownIntValue</a> = -1000; <a name="l00091"></a><a class="code" href="SoccerTypes_8h.html#a22">00091</a> <font class="keyword">const</font> <font class="keywordtype">int</font> <a class="code" href="SoccerTypes_8h.html#a22">UnknownTime</a> = -20; <a name="l00092"></a><a class="code" href="SoccerTypes_8h.html#a23">00092</a> <font class="keyword">const</font> <font class="keywordtype">long</font> <a class="code" href="SoccerTypes_8h.html#a23">UnknownMessageNr</a> = -30; 00094 <font class="comment">/******************************************************************************/</font>00095 <font class="comment">/********************** ENUMERATIONS ******************************************/</font>00096 <font class="comment">/******************************************************************************/</font>00097 <a name="l00102"></a><a class="code" href="SoccerTypes_8h.html#a240">00102</a> <font class="keyword">enum</font> <a class="code" href="SoccerTypes_8h.html#a240">ObjectT</a> { <font class="comment">// don't change order</font>00103 <a class="code" href="SoccerTypes_8h.html#a240a24">OBJECT_BALL</a>, 00104 <a class="code" href="SoccerTypes_8h.html#a240a25">OBJECT_GOAL_L</a>, <font class="comment">// 2 goals</font>00105 <a class="code" href="SoccerTypes_8h.html#a240a26">OBJECT_GOAL_R</a>, 00106 <a class="code" href="SoccerTypes_8h.html#a240a27">OBJECT_GOAL_UNKNOWN</a>, 00107 <a class="code" href="SoccerTypes_8h.html#a240a28">OBJECT_LINE_L</a>, <font class="comment">// 4 lines</font>00108 <a class="code" href="SoccerTypes_8h.html#a240a29">OBJECT_LINE_R</a>, 00109 <a class="code" href="SoccerTypes_8h.html#a240a30">OBJECT_LINE_B</a>, 00110 <a class="code" href="SoccerTypes_8h.html#a240a31">OBJECT_LINE_T</a>, 00111 <a class="code" href="SoccerTypes_8h.html#a240a32">OBJECT_FLAG_L_T</a>, <font class="comment">// 53 flags</font>00112 <a class="code" href="SoccerTypes_8h.html#a240a33">OBJECT_FLAG_T_L_50</a>, 00113 <a class="code" href="SoccerTypes_8h.html#a240a34">OBJECT_FLAG_T_L_40</a>, 00114 <a class="code" href="SoccerTypes_8h.html#a240a35">OBJECT_FLAG_T_L_30</a>, 00115 <a class="code" href="SoccerTypes_8h.html#a240a36">OBJECT_FLAG_T_L_20</a>, 00116 <a class="code" href="SoccerTypes_8h.html#a240a37">OBJECT_FLAG_T_L_10</a>, 00117 <a class="code" href="SoccerTypes_8h.html#a240a38">OBJECT_FLAG_T_0</a>, 00118 <a class="code" href="SoccerTypes_8h.html#a240a39">OBJECT_FLAG_C_T</a>, 00119 <a class="code" href="SoccerTypes_8h.html#a240a40">OBJECT_FLAG_T_R_10</a>, 00120 <a class="code" href="SoccerTypes_8h.html#a240a41">OBJECT_FLAG_T_R_20</a>, 00121 <a class="code" href="SoccerTypes_8h.html#a240a42">OBJECT_FLAG_T_R_30</a>, 00122 <a class="code" href="SoccerTypes_8h.html#a240a43">OBJECT_FLAG_T_R_40</a>, 00123 <a class="code" href="SoccerTypes_8h.html#a240a44">OBJECT_FLAG_T_R_50</a>, 00124 <a class="code" href="SoccerTypes_8h.html#a240a45">OBJECT_FLAG_R_T</a>, 00125 <a class="code" href="SoccerTypes_8h.html#a240a46">OBJECT_FLAG_R_T_30</a>, 00126 <a class="code" href="SoccerTypes_8h.html#a240a47">OBJECT_FLAG_R_T_20</a>, 00127 <a class="code" href="SoccerTypes_8h.html#a240a48">OBJECT_FLAG_R_T_10</a>, 00128 <a class="code" href="SoccerTypes_8h.html#a240a49">OBJECT_FLAG_G_R_T</a>, 00129 <a class="code" href="SoccerTypes_8h.html#a240a50">OBJECT_FLAG_R_0</a>, 00130 <a class="code" href="SoccerTypes_8h.html#a240a51">OBJECT_FLAG_G_R_B</a>, 00131 <a class="code" href="SoccerTypes_8h.html#a240a52">OBJECT_FLAG_R_B_10</a>, 00132 <a class="code" href="SoccerTypes_8h.html#a240a53">OBJECT_FLAG_R_B_20</a>, 00133 <a class="code" href="SoccerTypes_8h.html#a240a54">OBJECT_FLAG_R_B_30</a>, 00134 <a class="code" href="SoccerTypes_8h.html#a240a55">OBJECT_FLAG_R_B</a>, 00135 <a class="code" href="SoccerTypes_8h.html#a240a56">OBJECT_FLAG_B_R_50</a>, 00136 <a class="code" href="SoccerTypes_8h.html#a240a57">OBJECT_FLAG_B_R_40</a>, 00137 <a class="code" href="SoccerTypes_8h.html#a240a58">OBJECT_FLAG_B_R_30</a>, 00138 <a class="code" href="SoccerTypes_8h.html#a240a59">OBJECT_FLAG_B_R_20</a>, 00139 <a class="code" href="SoccerTypes_8h.html#a240a60">OBJECT_FLAG_B_R_10</a>, 00140 <a class="code" href="SoccerTypes_8h.html#a240a61">OBJECT_FLAG_C_B</a>, 00141 <a class="code" href="SoccerTypes_8h.html#a240a62">OBJECT_FLAG_B_0</a>, 00142 <a class="code" href="SoccerTypes_8h.html#a240a63">OBJECT_FLAG_B_L_10</a>, 00143 <a class="code" href="SoccerTypes_8h.html#a240a64">OBJECT_FLAG_B_L_20</a>, 00144 <a class="code" href="SoccerTypes_8h.html#a240a65">OBJECT_FLAG_B_L_30</a>, 00145 <a class="code" href="SoccerTypes_8h.html#a240a66">OBJECT_FLAG_B_L_40</a>, 00146 <a class="code" href="SoccerTypes_8h.html#a240a67">OBJECT_FLAG_B_L_50</a>, 00147 <a class="code" href="SoccerTypes_8h.html#a240a68">OBJECT_FLAG_L_B</a>, 00148 <a class="code" href="SoccerTypes_8h.html#a240a69">OBJECT_FLAG_L_B_30</a>, 00149 <a class="code" href="SoccerTypes_8h.html#a240a70">OBJECT_FLAG_L_B_20</a>, 00150 <a class="code" href="SoccerTypes_8h.html#a240a71">OBJECT_FLAG_L_B_10</a>,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?