60 |
jpm |
1 |
<html>
|
|
|
2 |
<head>
|
|
|
3 |
<title>Documentation</title>
|
|
|
4 |
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
|
|
|
5 |
<link rel='stylesheet' href='style.css' />
|
|
|
6 |
</head>
|
|
|
7 |
|
|
|
8 |
<body>
|
|
|
9 |
<div align='center'>
|
|
|
10 |
<table cellpadding='0' cellspacing='0' id='contenu' class='round' style='width: 80%; margin-bottom: 20px'>
|
|
|
11 |
<tr>
|
|
|
12 |
<td class='borderhg'> </td>
|
|
|
13 |
<td class='borderh'> </td>
|
|
|
14 |
<td class='cornerhd'></td>
|
|
|
15 |
</tr>
|
|
|
16 |
<tr>
|
|
|
17 |
<td class='borderg'> </td>
|
|
|
18 |
<td><a id="top"></a><h2> Class Point</h2><div class="extends"><ul>
|
|
|
19 |
<li><a href="Shape.html">Shape</a></li>
|
|
|
20 |
<ul><li>Point</li></ul>
|
|
|
21 |
</ul></div><div class="description">
|
|
|
22 |
<p>La classe <a href="Point.html">Point</a> permet de manipuler des points dans un espace de deux dimensions.</p>
|
|
|
23 |
</div><ul class="links"><li><a href="index.html">Retourner voir la liste de toutes les classes</a></li></ul><h2>Méthodes et propriétés</h2><ul class="properties">
|
|
|
24 |
<li>
|
|
|
25 |
<span class="access">public</span> <span class="type">float</span> <a href="Point.html#property.x"><span class="argument">$x</span></a>
|
|
|
26 |
</li>
|
|
|
27 |
<li>
|
|
|
28 |
<span class="access">public</span> <span class="type">float</span> <a href="Point.html#property.y"><span class="argument">$y</span></a>
|
|
|
29 |
</li>
|
|
|
30 |
</ul><ul class="methods">
|
|
|
31 |
<li>
|
|
|
32 |
<span class="access">public</span> <a href="Point.html#method.__construct">__construct</a>(<span class="type">float</span> <span class="argument">$x</span>, <span class="type">float</span> <span class="argument">$y</span>)
|
|
|
33 |
</li>
|
|
|
34 |
<li>
|
|
|
35 |
<span class="access">public</span> <a href="Point.html#method.setX">setX</a>(<span class="type">float</span> <span class="argument">$x</span>)
|
|
|
36 |
</li>
|
|
|
37 |
<li>
|
|
|
38 |
<span class="access">public</span> <a href="Point.html#method.setY">setY</a>(<span class="type">float</span> <span class="argument">$y</span>)
|
|
|
39 |
</li>
|
|
|
40 |
<li>
|
|
|
41 |
<span class="access">public</span> <a href="Point.html#method.setLocation">setLocation</a>(<span class="type">float</span> <span class="argument">$x</span>, <span class="type">float</span> <span class="argument">$y</span>)
|
|
|
42 |
</li>
|
|
|
43 |
<li>
|
|
|
44 |
<span class="access">public</span> <span class="type">array</span> <a href="Point.html#method.getLocation">getLocation</a>()
|
|
|
45 |
</li>
|
|
|
46 |
<li>
|
|
|
47 |
<span class="access">public</span> <span class="type">float</span> <a href="Point.html#method.getDistance">getDistance</a>(<a href="Point.html"><span class="type">Point</span></a> <span class="argument">$p</span>)
|
|
|
48 |
</li>
|
|
|
49 |
<li>
|
|
|
50 |
<span class="access">public</span> <a href="Point.html#method.move">move</a>(<span class="type">float</span> <span class="argument">$x</span>, <span class="type">float</span> <span class="argument">$y</span>)
|
|
|
51 |
</li>
|
|
|
52 |
</ul><h2>Documentation</h2><ul class="doc">
|
|
|
53 |
<li class="property">
|
|
|
54 |
<a id="property.x"></a><span class="access">public</span> <span class="type">float</span> <a href="Point.html#property.x"><span class="argument">$x</span></a><div class="description">
|
|
|
55 |
La position du point sur l'axe des abscisses.
|
|
|
56 |
</div>
|
|
|
57 |
<div class="description-bottom"><a href="Point.html#top">Remonter</a></div>
|
|
|
58 |
</li>
|
|
|
59 |
<li class="property">
|
|
|
60 |
<a id="property.y"></a><span class="access">public</span> <span class="type">float</span> <a href="Point.html#property.y"><span class="argument">$y</span></a><div class="description">
|
|
|
61 |
La position du point sur l'axe des ordonnées.
|
|
|
62 |
</div>
|
|
|
63 |
<div class="description-bottom"><a href="Point.html#top">Remonter</a></div>
|
|
|
64 |
</li>
|
|
|
65 |
<li class="method">
|
|
|
66 |
<a id="method.__construct"></a><span class="access">public</span> <a href="Point.html#method.__construct">__construct</a>(<span class="type">float</span> <span class="argument">$x</span>, <span class="type">float</span> <span class="argument">$y</span>)
|
|
|
67 |
<div class="description">
|
|
|
68 |
Déclare un nouveau point avec des coordonnées x et y.
|
|
|
69 |
</div>
|
|
|
70 |
<div class="description-bottom"><a href="Point.html#top">Remonter</a></div>
|
|
|
71 |
</li>
|
|
|
72 |
<li class="method">
|
|
|
73 |
<a id="method.setX"></a><span class="access">public</span> <a href="Point.html#method.setX">setX</a>(<span class="type">float</span> <span class="argument">$x</span>)
|
|
|
74 |
<div class="description">
|
|
|
75 |
Change la position X du point.
|
|
|
76 |
</div>
|
|
|
77 |
<div class="description-bottom"><a href="Point.html#top">Remonter</a></div>
|
|
|
78 |
</li>
|
|
|
79 |
<li class="method">
|
|
|
80 |
<a id="method.setY"></a><span class="access">public</span> <a href="Point.html#method.setY">setY</a>(<span class="type">float</span> <span class="argument">$y</span>)
|
|
|
81 |
<div class="description">
|
|
|
82 |
Change la position Y du point.
|
|
|
83 |
</div>
|
|
|
84 |
<div class="description-bottom"><a href="Point.html#top">Remonter</a></div>
|
|
|
85 |
</li>
|
|
|
86 |
<li class="method">
|
|
|
87 |
<a id="method.setLocation"></a><span class="access">public</span> <a href="Point.html#method.setLocation">setLocation</a>(<span class="type">float</span> <span class="argument">$x</span>, <span class="type">float</span> <span class="argument">$y</span>)
|
|
|
88 |
<div class="description">
|
|
|
89 |
Change la position du point pour les valeurs x et y passées en paramètre.
|
|
|
90 |
</div>
|
|
|
91 |
<div class="description-bottom"><a href="Point.html#top">Remonter</a></div>
|
|
|
92 |
</li>
|
|
|
93 |
<li class="method">
|
|
|
94 |
<a id="method.getLocation"></a><span class="access">public</span> <span class="type">array</span> <a href="Point.html#method.getLocation">getLocation</a>()
|
|
|
95 |
<div class="description">
|
|
|
96 |
Retourne la position du point dans un tableau à deux valeurs.
|
|
|
97 |
<pre>
|
|
|
98 |
|
|
|
99 |
<?php
|
|
|
100 |
$p = new Point(3, 7);
|
|
|
101 |
list($x, $y) = $p->getLocation(); // array(3, 7)
|
|
|
102 |
?>
|
|
|
103 |
|
|
|
104 |
</pre>
|
|
|
105 |
</div>
|
|
|
106 |
<div class="description-bottom"><a href="Point.html#top">Remonter</a></div>
|
|
|
107 |
</li>
|
|
|
108 |
<li class="method">
|
|
|
109 |
<a id="method.getDistance"></a><span class="access">public</span> <span class="type">float</span> <a href="Point.html#method.getDistance">getDistance</a>(<a href="Point.html"><span class="type">Point</span></a> <span class="argument">$p</span>)
|
|
|
110 |
<div class="description">
|
|
|
111 |
Retourne la distance entre le point et le point $p.
|
|
|
112 |
</div>
|
|
|
113 |
<div class="description-bottom"><a href="Point.html#top">Remonter</a></div>
|
|
|
114 |
</li>
|
|
|
115 |
<li class="method">
|
|
|
116 |
<a id="method.move"></a><span class="access">public</span> <a href="Point.html#method.move">move</a>(<span class="type">float</span> <span class="argument">$x</span>, <span class="type">float</span> <span class="argument">$y</span>)
|
|
|
117 |
<div class="description">
|
|
|
118 |
Change la position du point en ajoutant à ses coordonnées actuelles les valeurs x et y passées en paramètre.
|
|
|
119 |
</div>
|
|
|
120 |
<div class="description-bottom"><a href="Point.html#top">Remonter</a></div>
|
|
|
121 |
</li>
|
|
|
122 |
</ul>
|
|
|
123 |
</td>
|
|
|
124 |
<td class='borderd'> </td>
|
|
|
125 |
</tr>
|
|
|
126 |
<tr>
|
|
|
127 |
<td class='cornerbg'></td>
|
|
|
128 |
<td class='borderb'> </td>
|
|
|
129 |
<td class='cornerbd'></td>
|
|
|
130 |
</tr>
|
|
|
131 |
</table>
|
|
|
132 |
</div>
|
|
|
133 |
</body>
|
|
|
134 |
</html>
|