📄 classplayertypeinfo.html
字号:
<!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>PlayerTypeInfo class Reference</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>PlayerTypeInfo Class Reference</h1><code>#include <<a class="el" href="Formations_8h-source.html">Formations.h</a>></code><p><a href="classPlayerTypeInfo-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a0">PlayerTypeInfo</a> ()</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a1">PlayerTypeInfo</a> (<a class="el" href="SoccerTypes_8h.html#a248">PlayerT</a>, double, double, double, double, bool)</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a2">setValues</a> (<a class="el" href="SoccerTypes_8h.html#a248">PlayerT</a>, double, double, double, double, bool)</td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a3">show</a> (ostream &os=cout)</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a4">setPlayerType</a> (<a class="el" href="SoccerTypes_8h.html#a248">PlayerT</a> type)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="SoccerTypes_8h.html#a248">PlayerT</a> </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a5">getPlayerType</a> () const</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a6">setAttrX</a> (double attrX)</td></tr><tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a7">getAttrX</a> () const</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a8">setAttrY</a> (double attrY)</td></tr><tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a9">getAttrY</a> () const</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a10">setMinX</a> (double minX)</td></tr><tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a11">getMinX</a> () const</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a12">setMaxX</a> (double maxX)</td></tr><tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a13">getMaxX</a> () const</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a14">setBehindBall</a> (bool b)</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#a15">getBehindBall</a> () const</td></tr><tr><td colspan=2><br><h2>Private Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="SoccerTypes_8h.html#a248">PlayerT</a> </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#o0">playerType</a></td></tr><tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#o1">dAttrX</a></td></tr><tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#o2">dAttrY</a></td></tr><tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#o3">dMinX</a></td></tr><tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#o4">dMaxX</a></td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classPlayerTypeInfo.html#o5">bBehindBall</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class contains information for one individual player_type, defined in <a class="el" href="SoccerTypes_8h.html">SoccerTypes.h</a>. A player_type should not be confused with the player_types introduced in soccerserver 7.xx. A playerType PlayerT is defined as the kind of a player. Different possibilities are PT_ATTACKER, PT_MIDFIELDER_WING, etc. This class contains different characteristics of one playertype. This information consists of the following values:<ul><li>dAttrX - x attraction to the ball for this player type.<li>dAtttY - y attraction to the ball for this player type.<li>dMinX - minimal x coordinate for this player<li>dMaxX - maximal x coordinate for this player<li>bBehindBall - indicating whether this player type should always stay behind the ball or not.</ul>This class contains different get and set methods to change the values associated for this class, normally these are changed when the <a class="el" href="classFormations.html">Formations</a> class reads in the formation file. <p><p>Definition at line <a class="el" href="Formations_8h-source.html#l00088">88</a> of file <a class="el" href="Formations_8h-source.html">Formations.h</a>.<hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="PlayerTypeInfo::PlayerTypeInfo"></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"> PlayerTypeInfo::PlayerTypeInfo </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </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 is the default constructor and sets all the values of this class to "illegal" values. This method is needed when an array of this class is initialized, since then the default constructor (without arguments) is called. Afterwards the actual values should be set using the method setValues. <p>Definition at line <a class="el" href="Formations_8C-source.html#l00059">59</a> of file <a class="el" href="Formations_8C-source.html">Formations.C</a>.<p>References <a class="el" href="namespace_3globalScope_4.html#a248a192">PT_ILLEGAL</a>, <a class="el" href="Formations_8C-source.html#l00090">setValues</a>(), and <a class="el" href="SoccerTypes_8h-source.html#l00088">UnknownDoubleValue</a>. </td> </tr></table><a name="a1" doxytag="PlayerTypeInfo::PlayerTypeInfo"></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"> PlayerTypeInfo::PlayerTypeInfo </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="SoccerTypes_8h.html#a248">PlayerT</a> </td> <td class="mdname" nowrap> <em>pt</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>double </td> <td class="mdname" nowrap> <em>dAttrX</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>double </td> <td class="mdname" nowrap> <em>dAttrY</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>double </td> <td class="mdname" nowrap> <em>dMinX</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>double </td> <td class="mdname" nowrap> <em>dMaxX</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>bBehindBall</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 Constructor receives the values for all the member variables as arguments and initializes the member variables using the method setValues. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pt</em> </td><td>PlayerType corresponding to the player type of this class </td></tr><tr><td valign=top><em>dAttrX</em> </td><td>x attraction to the ball </td></tr><tr><td valign=top><em>dAttrY</em> </td><td>y attraction to the ball </td></tr><tr><td valign=top><em>dMinX</em> </td><td>minimal x coordinate for this player type </td></tr><tr><td valign=top><em>dMaxX</em> </td><td>maximal x coordinate for this player type </td></tr><tr><td valign=top><em>bBehindBall</em> </td><td>boolean indicating whether this player type should always stay behind the ball. </td></tr></table></dl><p>Definition at line <a class="el" href="Formations_8C-source.html#l00074">74</a> of file <a class="el" href="Formations_8C-source.html">Formations.C</a>.<p>References <a class="el" href="Formations_8h-source.html#l00095">bBehindBall</a>, <a class="el" href="Formations_8h-source.html#l00091">dAttrX</a>, <a class="el" href="Formations_8h-source.html#l00092">dAttrY</a>, <a class="el" href="Formations_8h-source.html#l00094">dMaxX</a>, <a class="el" href="Formations_8h-source.html#l00093">dMinX</a>, <a class="el" href="SoccerTypes_8h-source.html#l00316">PlayerT</a>, and <a class="el" href="Formations_8C-source.html#l00090">setValues</a>(). </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a7" doxytag="PlayerTypeInfo::getAttrX"></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 PlayerTypeInfo::getAttrX </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 returns the x attraction to the ball for this player type. The x attraction to the ball is a double in the range (0,1). This value is used to determine the x coordinate of the strategic position for this player type. The x attraction of the ball is multiplied with the x coordinate of the ball and added to the home position of the agent to determine the x coordinate of the strategic position. <dl compact><dt><b>Returns: </b><dd>x attraction for this player type </dl><p>Definition at line <a class="el" href="Formations_8C-source.html#l00151">151</a> of file <a class="el" href="Formations_8C-source.html">Formations.C</a>.<p>References <a class="el" href="Formations_8h-source.html#l00091">dAttrX</a>.<p>Referenced by <a class="el" href="Formations_8C-source.html#l00488">Formations::getStrategicPosition</a>(). </td> </tr></table><a name="a9" doxytag="PlayerTypeInfo::getAttrY"></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 PlayerTypeInfo::getAttrY </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 returns the y attraction to the ball for this player type. The y attraction to the ball is a double in the range (0,1). This value is used to determine the y coordinate of the strategic position for this player type. The y attraction of the ball is multiplied with the y coordinate of the ball and added to the home position of the agent to determine the y coordinate of the strategic position. <dl compact><dt><b>Returns: </b><dd>y attraction for this player type </dl><p>Definition at line <a class="el" href="Formations_8C-source.html#l00177">177</a> of file <a class="el" href="Formations_8C-source.html">Formations.C</a>.<p>References <a class="el" href="Formations_8h-source.html#l00092">dAttrY</a>.<p>Referenced by <a class="el" href="Formations_8C-source.html#l00488">Formations::getStrategicPosition</a>(). </td> </tr></table><a name="a15" doxytag="PlayerTypeInfo::getBehindBall"></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 PlayerTypeInfo::getBehindBall </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 returns the value that indicates whether this player type should stay behind the ball or not. When set to true and the strategic position for this player type is calculated to be in front of the ball. The x coordinate of the strategic position is set to the x coordinate of the ball. <dl compact><dt><b>Returns: </b><dd>bool indicating whether to stay behind the ball or not </dl><p>Definition at line <a class="el" href="Formations_8C-source.html#l00241">241</a> of file <a class="el" href="Formations_8C-source.html">Formations.C</a>.<p>References <a class="el" href="Formations_8h-source.html#l00095">bBehindBall</a>.<p>Referenced by <a class="el" href="Formations_8C-source.html#l00488">Formations::getStrategicPosition</a>(). </td> </tr></table><a name="a13" doxytag="PlayerTypeInfo::getMaxX"></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 PlayerTypeInfo::getMaxX </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 returns the maximal x coordinate for this player type. When the calculated x coordinate for the strategic position is larger than this value, the x coordinate is set to this maximal x coordinate. <dl compact><dt><b>Returns: </b><dd>maximal x coordinate for this player type </dl><p>Definition at line <a class="el" href="Formations_8C-source.html#l00217">217</a> of file <a class="el" href="Formations_8C-source.html">Formations.C</a>.<p>References <a class="el" href="Formations_8h-source.html#l00094">dMaxX</a>.<p>Referenced by <a class="el" href="Formations_8C-source.html#l00488">Formations::getStrategicPosition</a>(). </td> </tr></table><a name="a11" doxytag="PlayerTypeInfo::getMinX"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -