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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>wire</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="V_Sim API - Reference Manual">
<link rel="up" href="ch04.html" title="Pairs extensions">
<link rel="prev" href="v-sim-cylinder.html" title="cylinder">
<link rel="next" href="ch05.html" title="OpenGL specific extensions">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="v-sim-cylinder.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">V_Sim API - Reference Manual</th>
<td><a accesskey="n" href="ch05.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#v-sim-wire.synopsis" class="shortcut">Top</a>
|
<a href="#v-sim-wire.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="wire">
<a name="v-sim-wire"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="v-sim-wire.top_of_page"></a>wire</span></h2>
<p>wire — Gives methods to draw lines as OpenGl objects
pairing two elements.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="v-sim-wire.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"><a class="link" href="v-sim-visu-pairs.html#VisuPairExtension" title="VisuPairExtension"><span class="returnvalue">VisuPairExtension</span></a>* <a class="link" href="v-sim-wire.html#initPairsWire" title="initPairsWire ()">initPairsWire</a> ();
<a class="link" href="v-sim-visu-pairs.html#VisuPairExtension" title="VisuPairExtension"><span class="returnvalue">VisuPairExtension</span></a>* <a class="link" href="v-sim-wire.html#wireGet-static" title="wireGet_static ()">wireGet_static</a> ();
<span class="returnvalue">int</span> <a class="link" href="v-sim-wire.html#wireSet-generalWidth" title="wireSet_generalWidth ()">wireSet_generalWidth</a> (<em class="parameter"><code><span class="type">int</span> val</code></em>);
<span class="returnvalue">int</span> <a class="link" href="v-sim-wire.html#wireGet-generalWidth" title="wireGet_generalWidth ()">wireGet_generalWidth</a> ();
<span class="returnvalue">int</span> <a class="link" href="v-sim-wire.html#wireSet-width" title="wireSet_width ()">wireSet_width</a> (<em class="parameter"><code><a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> *data</code></em>,
<em class="parameter"><code><span class="type">int</span> val</code></em>);
<span class="returnvalue">int</span> <a class="link" href="v-sim-wire.html#wireGet-width" title="wireGet_width ()">wireGet_width</a> (<em class="parameter"><code><a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> *data</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-wire.html#wireSet-shade" title="wireSet_shade ()">wireSet_shade</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);
<a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="returnvalue">Shade</span></a>* <a class="link" href="v-sim-wire.html#wireGet-shade" title="wireGet_shade ()">wireGet_shade</a> ();
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-wire.html#wireSet-stipple" title="wireSet_stipple ()">wireSet_stipple</a> (<em class="parameter"><code><a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> *data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> stipple</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a> <a class="link" href="v-sim-wire.html#wireGet-stipple" title="wireGet_stipple ()">wireGet_stipple</a> (<em class="parameter"><code><a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> *data</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="v-sim-wire.description"></a><h2>Description</h2>
<p>
</p>
<p>The wire pair module is the simplest way to draw pairs
between elements : using lines. The size of lines can be chosen but
is limited by OpenGL implementation that usually only allow line
width of 10 pixels as maximum size.</p>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="v-sim-wire.details"></a><h2>Details</h2>
<div class="refsect2" title="initPairsWire ()">
<a name="initPairsWire"></a><h3>initPairsWire ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-visu-pairs.html#VisuPairExtension" title="VisuPairExtension"><span class="returnvalue">VisuPairExtension</span></a>* initPairsWire ();</pre>
<p>
This method is used by V_Sim on startup, don't use it on your own.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the wire pair extension.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="wireGet_static ()">
<a name="wireGet-static"></a><h3>wireGet_static ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-visu-pairs.html#VisuPairExtension" title="VisuPairExtension"><span class="returnvalue">VisuPairExtension</span></a>* wireGet_static ();</pre>
<p>
Internal function to access the <a class="link" href="v-sim-visu-pairs.html#VisuPairExtension" title="VisuPairExtension"><span class="type">VisuPairExtension</span></a> wire.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the <a class="link" href="v-sim-visu-pairs.html#VisuPairExtension" title="VisuPairExtension"><span class="type">VisuPairExtension</span></a> wire.
</td>
</tr></tbody>
</table></div>
<p class="since">Since 3.6</p>
</div>
<hr>
<div class="refsect2" title="wireSet_generalWidth ()">
<a name="wireSet-generalWidth"></a><h3>wireSet_generalWidth ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> wireSet_generalWidth (<em class="parameter"><code><span class="type">int</span> val</code></em>);</pre>
<p>
The width of line between elements can be chosen by kinds of pairs,
but can use a default value for all kinds of pairs when no individual value
is available. Use this method to set the default width.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
<td>a positive integer.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 1 if the calling method should call the <a class="link" href="v-sim-visu-pairs.html#visu-pair-build" title="visu_pair_build ()"><code class="function">visu_pair_build()</code></a> method, 0 if not.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="wireGet_generalWidth ()">
<a name="wireGet-generalWidth"></a><h3>wireGet_generalWidth ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> wireGet_generalWidth ();</pre>
<p>
Get the default width for wire pairs (see <a class="link" href="v-sim-wire.html#wireSet-generalWidth" title="wireSet_generalWidth ()"><code class="function">wireSet_generalWidth()</code></a> to set this value).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the default width.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="wireSet_width ()">
<a name="wireSet-width"></a><h3>wireSet_width ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> wireSet_width (<em class="parameter"><code><a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> *data</code></em>,
<em class="parameter"><code><span class="type">int</span> val</code></em>);</pre>
<p>
This method allows to change the width of line for a specific pair.
When a pair is rendered via with a line, it first checks if that pairs has
a specific width value set by this method. If not, it uses the default value.
If the specific value is indeed changed, the pairs OpenGl list is not
recreated automatically and the calling method should call the <a class="link" href="v-sim-visu-pairs.html#visu-pair-build" title="visu_pair_build ()"><code class="function">visu_pair_build()</code></a> method
according to the return value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
<td>a positive integer.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 1 if the calling method should call the <a class="link" href="v-sim-visu-pairs.html#visu-pair-build" title="visu_pair_build ()"><code class="function">visu_pair_build()</code></a> method, 0 if not.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="wireGet_width ()">
<a name="wireGet-width"></a><h3>wireGet_width ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> wireGet_width (<em class="parameter"><code><a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> *data</code></em>);</pre>
<p>
Get the width of the given pair <em class="parameter"><code>data</code></em>. If the given pair has no
specific width, the defaul value is returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the width of the given pair.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="wireSet_shade ()">
<a name="wireSet-shade"></a><h3>wireSet_shade ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> wireSet_shade (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);</pre>
<p>
If <em class="parameter"><code>shade</code></em> is not NULL, make the colour of each pair varies with its
length according to <em class="parameter"><code>shade</code></em> colour scheme.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> object (can be NULL).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if shade is changed.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.6</p>
</div>
<hr>
<div class="refsect2" title="wireGet_shade ()">
<a name="wireGet-shade"></a><h3>wireGet_shade ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="returnvalue">Shade</span></a>* wireGet_shade ();</pre>
<p>
Colour of wires can depend on length, following a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> scheme.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> scheme if used, or NULL.
</td>
</tr></tbody>
</table></div>
<p class="since">Since 3.6</p>
</div>
<hr>
<div class="refsect2" title="wireSet_stipple ()">
<a name="wireSet-stipple"></a><h3>wireSet_stipple ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> wireSet_stipple (<em class="parameter"><code><a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> *data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> stipple</code></em>);</pre>
<p>
Change the line pattern of <em class="parameter"><code>data</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stipple</code></em> :</span></p></td>
<td>a pattern.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if the value is different from previous, then call
the <a class="link" href="v-sim-visu-pairs.html#visu-pair-build" title="visu_pair_build ()"><code class="function">visu_pair_build()</code></a> method.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="wireGet_stipple ()">
<a name="wireGet-stipple"></a><h3>wireGet_stipple ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a> wireGet_stipple (<em class="parameter"><code><a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> *data</code></em>);</pre>
<p>
Get the line pattern of <em class="parameter"><code>data</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-visu-pairs.html#VisuPairData" title="VisuPairData"><span class="type">VisuPairData</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a line pattern (default is 65535).
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>
|