-
Notifications
You must be signed in to change notification settings - Fork 0
/
classcoord.html
217 lines (208 loc) · 13 KB
/
classcoord.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Simutrans-Squirrel-API: coord Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Simutrans-Squirrel-API
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Public Attributes</a> |
<a href="classcoord-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">coord Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for coord:</div>
<div class="dyncontent">
<div class="center">
<img src="classcoord.png" usemap="#coord_map" alt=""/>
<map id="coord_map" name="coord_map">
<area href="classcity__x.html" alt="city_x" shape="rect" coords="0,56,112,80"/>
<area href="classcoord3d.html" alt="coord3d" shape="rect" coords="183,56,295,80"/>
<area href="classfactory__x.html" alt="factory_x" shape="rect" coords="305,56,417,80"/>
<area href="classsquare__x.html" alt="square_x" shape="rect" coords="427,56,539,80"/>
<area href="classmap__object__x.html" alt="map_object_x" shape="rect" coords="0,112,112,136"/>
<area href="classschedule__entry__x.html" alt="schedule_entry_x" shape="rect" coords="122,112,234,136"/>
<area href="classtile__object__list__x.html" alt="tile_object_list_x" shape="rect" coords="244,112,356,136"/>
<area href="classtile__x.html" alt="tile_x" shape="rect" coords="366,112,478,136"/>
<area href="classbridge__x.html" alt="bridge_x" shape="rect" coords="122,168,234,192"/>
<area href="classbuilding__x.html" alt="building_x" shape="rect" coords="122,224,234,248"/>
<area href="classfield__x.html" alt="field_x" shape="rect" coords="122,280,234,304"/>
<area href="classlabel__x.html" alt="label_x" shape="rect" coords="122,336,234,360"/>
<area href="classpowerline__x.html" alt="powerline_x" shape="rect" coords="122,392,234,416"/>
<area href="classsign__x.html" alt="sign_x" shape="rect" coords="122,448,234,472"/>
<area href="classtree__x.html" alt="tree_x" shape="rect" coords="122,504,234,528"/>
<area href="classtunnel__x.html" alt="tunnel_x" shape="rect" coords="122,560,234,584"/>
<area href="classway__x.html" alt="way_x" shape="rect" coords="122,616,234,640"/>
<area href="classwayobj__x.html" alt="wayobj_x" shape="rect" coords="122,672,234,696"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab7df16d922ba90a06d29f4056afdd972"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classcoord.html#ab7df16d922ba90a06d29f4056afdd972">_tostring</a> ()</td></tr>
<tr class="separator:ab7df16d922ba90a06d29f4056afdd972"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a420d2df22c044db935f60ead330da9bb"><td class="memItemLeft" align="right" valign="top"><a id="a420d2df22c044db935f60ead330da9bb"></a>
 </td><td class="memItemRight" valign="bottom"><b>coord</b> (int <a class="el" href="classcoord.html#a31d0b44c0bfcea55a67587a3d8fe2348">x</a>, int <a class="el" href="classcoord.html#a77e983dd41d55fb0594e983cc1cbcf15">y</a>)</td></tr>
<tr class="separator:a420d2df22c044db935f60ead330da9bb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa4827cc01e0bde2e7ec51806b410e153"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classcoord.html#aa4827cc01e0bde2e7ec51806b410e153">href</a> (string text)</td></tr>
<tr class="separator:aa4827cc01e0bde2e7ec51806b410e153"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac1b0453647a1134620a50d0313d8607f"><td class="memItemLeft" align="right" valign="top"><a id="ac1b0453647a1134620a50d0313d8607f"></a>
<a class="el" href="classcoord.html">coord</a> </td><td class="memItemRight" valign="bottom"><b>operator*</b> (integer fac)</td></tr>
<tr class="separator:ac1b0453647a1134620a50d0313d8607f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af021b4c3f073f9baeaf1d8f9c4c2847d"><td class="memItemLeft" align="right" valign="top"><a id="af021b4c3f073f9baeaf1d8f9c4c2847d"></a>
<a class="el" href="classcoord.html">coord</a> </td><td class="memItemRight" valign="bottom"><b>operator+</b> (<a class="el" href="classcoord.html">coord</a> other)</td></tr>
<tr class="separator:af021b4c3f073f9baeaf1d8f9c4c2847d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adef25f06f5b2adb67d373adf1157485a"><td class="memItemLeft" align="right" valign="top"><a id="adef25f06f5b2adb67d373adf1157485a"></a>
<a class="el" href="classcoord.html">coord</a> </td><td class="memItemRight" valign="bottom"><b>operator-</b> (<a class="el" href="classcoord.html">coord</a> other)</td></tr>
<tr class="separator:adef25f06f5b2adb67d373adf1157485a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af395a5da1cdcda17793d4e768807b6ad"><td class="memItemLeft" align="right" valign="top"><a id="af395a5da1cdcda17793d4e768807b6ad"></a>
<a class="el" href="classcoord.html">coord</a> </td><td class="memItemRight" valign="bottom"><b>operator-</b> ()</td></tr>
<tr class="separator:af395a5da1cdcda17793d4e768807b6ad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3a277a6d561f09bb3d51ef4456503515"><td class="memItemLeft" align="right" valign="top"><a id="a3a277a6d561f09bb3d51ef4456503515"></a>
<a class="el" href="classcoord.html">coord</a> </td><td class="memItemRight" valign="bottom"><b>operator/</b> (integer fac)</td></tr>
<tr class="separator:a3a277a6d561f09bb3d51ef4456503515"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a46a03145891ad2c80f75ebc8d46bdeb0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdir.html">dir</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcoord.html#a46a03145891ad2c80f75ebc8d46bdeb0">to_dir</a> ()</td></tr>
<tr class="separator:a46a03145891ad2c80f75ebc8d46bdeb0"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a31d0b44c0bfcea55a67587a3d8fe2348"><td class="memItemLeft" align="right" valign="top"><a id="a31d0b44c0bfcea55a67587a3d8fe2348"></a>
integer </td><td class="memItemRight" valign="bottom"><a class="el" href="classcoord.html#a31d0b44c0bfcea55a67587a3d8fe2348">x</a></td></tr>
<tr class="memdesc:a31d0b44c0bfcea55a67587a3d8fe2348"><td class="mdescLeft"> </td><td class="mdescRight">x-coordinate <br /></td></tr>
<tr class="separator:a31d0b44c0bfcea55a67587a3d8fe2348"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a77e983dd41d55fb0594e983cc1cbcf15"><td class="memItemLeft" align="right" valign="top"><a id="a77e983dd41d55fb0594e983cc1cbcf15"></a>
integer </td><td class="memItemRight" valign="bottom"><a class="el" href="classcoord.html#a77e983dd41d55fb0594e983cc1cbcf15">y</a></td></tr>
<tr class="memdesc:a77e983dd41d55fb0594e983cc1cbcf15"><td class="mdescLeft"> </td><td class="mdescRight">y-coordinate <br /></td></tr>
<tr class="separator:a77e983dd41d55fb0594e983cc1cbcf15"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class that holds 2d coordinates. All functions that use this as input parameters will accept every data structure that contains members x and y.</p>
<p>Coordinates always refer to the original rotation in <a class="el" href="api__skeleton_8h.html#ab2c5ab3c7a17f0969cdd40146339903a">map::file</a>. They will be rotated if transferred between the game engine and squirrel. </p>
<p class="definition">Definition at line <a class="el" href="api__simple_8cc_source.html#l00032">32</a> of file <a class="el" href="api__simple_8cc_source.html">api_simple.cc</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ab7df16d922ba90a06d29f4056afdd972"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7df16d922ba90a06d29f4056afdd972">◆ </a></span>_tostring()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string coord::_tostring </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Converts coordinate to string containing the coordinates in the current rotation of the map.</p>
<p>Cannot be used in links in scenario texts. Use <a class="el" href="classcoord.html#aa4827cc01e0bde2e7ec51806b410e153">href</a> instead. </p>
</div>
</div>
<a id="aa4827cc01e0bde2e7ec51806b410e153"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4827cc01e0bde2e7ec51806b410e153">◆ </a></span>href()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string coord::href </td>
<td>(</td>
<td class="paramtype">string </td>
<td class="paramname"><em>text</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Generates text to generate links to coordinates in scenario texts. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">text</td><td>text to be shown in the link </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a-tag with link in href </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__scen__skel.html#ga706b5bd21f80fc116a158dc964a5cfed">get_rule_text</a> </dd></dl>
</div>
</div>
<a id="a46a03145891ad2c80f75ebc8d46bdeb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46a03145891ad2c80f75ebc8d46bdeb0">◆ </a></span>to_dir()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdir.html">dir</a> coord::to_dir </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Helper function to convert direction vector to dir type. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="api__simple_8cc_source.html">api_simple.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>