2016-01-16 22:15:15 +01:00

445 lines
10 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>utils</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>utils</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
<li><a href="#Fields">Fields</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/stringutil.html">stringutil</a></li>
<li><a href="../modules/random.html">random</a></li>
<li><a href="../modules/noisemanager.html">noisemanager</a></li>
<li><a href="../modules/nodeutil.html">nodeutil</a></li>
<li><a href="../modules/posutil.html">posutil</a></li>
<li><a href="../modules/objectrefutil.html">objectrefutil</a></li>
<li><a href="../modules/nodeboxutil.html">nodeboxutil</a></li>
<li><a href="../modules/mapmanipulator.html">mapmanipulator</a></li>
<li><a href="../modules/fisheryates.html">fisheryates</a></li>
<li><a href="../modules/textureutil.html">textureutil</a></li>
<li><a href="../modules/blockutil.html">blockutil</a></li>
<li><a href="../modules/tango.html">tango</a></li>
<li><a href="../modules/arraymanipulator.html">arraymanipulator</a></li>
<li><a href="../modules/inventoryutil.html">inventoryutil</a></li>
<li><a href="../modules/entityutil.html">entityutil</a></li>
<li><a href="../modules/scheduler.html">scheduler</a></li>
<li><a href="../modules/blockedcache.html">blockedcache</a></li>
<li><a href="../modules/mathutil.html">mathutil</a></li>
<li><a href="../modules/log.html">log</a></li>
<li><a href="../modules/arrayutil.html">arrayutil</a></li>
<li><a href="../modules/directmapmanipulator.html">directmapmanipulator</a></li>
<li><a href="../modules/rotationutil.html">rotationutil</a></li>
<li><a href="../modules/settings.html">settings</a></li>
<li><a href="../modules/pathutil.html">pathutil</a></li>
<li><a href="../modules/wallmountedutil.html">wallmountedutil</a></li>
<li><a href="../modules/interpolate.html">interpolate</a></li>
<li><a href="../modules/transform.html">transform</a></li>
<li><a href="../modules/numberutil.html">numberutil</a></li>
<li><a href="../modules/test.html">test</a></li>
<li><strong>facedirutil</strong></li>
<li><a href="../modules/constants.html">constants</a></li>
<li><a href="../modules/minetestex.html">minetestex</a></li>
<li><a href="../modules/list.html">list</a></li>
<li><a href="../modules/stopwatch.html">stopwatch</a></li>
<li><a href="../modules/itemutil.html">itemutil</a></li>
<li><a href="../modules/color.html">color</a></li>
<li><a href="../modules/tableutil.html">tableutil</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>facedirutil</code></h1>
<p>Various functions and constants for working with the facedir value.</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#create_after_node_placed_upsidedown_handler">create_after_node_placed_upsidedown_handler (pseudo_mirroring, needed_pitch)</a></td>
<td class="summary">Creates a handler for the after_node_place callback which turns the placed
node upside down if the placer was looking at underside of another node or
if the placer looks upwards.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_vector">get_vector (id)</a></td>
<td class="summary">Gets the vector for the given ID.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#to_wallmounted">to_wallmounted (facedir_id)</a></td>
<td class="summary">Gets the corresponding wallmounted value for the given facedir value.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#upsidedown">upsidedown (facedir, pseudo_mirroring)</a></td>
<td class="summary">Gets the facedir for the given rotation as upside down.</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#NEGATIVE_X_VECTOR">NEGATIVE_X_VECTOR</a></td>
<td class="summary">The vector for the negative x direction.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#NEGATIVE_Z_VECTOR">NEGATIVE_Z_VECTOR</a></td>
<td class="summary">The vector for the negative z direction.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#POSITIVE_X_VECTOR">POSITIVE_X_VECTOR</a></td>
<td class="summary">The vector for the positive x direction.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#POSITIVE_Z_VECTOR">POSITIVE_Z_VECTOR</a></td>
<td class="summary">The vector for the positive z direction.</td>
</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#NEGATIVE_X">NEGATIVE_X</a></td>
<td class="summary">Attached to the node in the negative x direction.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#NEGATIVE_Z">NEGATIVE_Z</a></td>
<td class="summary">Attached to the node in the negative z direction.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#POSITIVE_X">POSITIVE_X</a></td>
<td class="summary">Attached to the node in the positive x direction.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#POSITIVE_Z">POSITIVE_Z</a></td>
<td class="summary">Attached to the node in the positive z direction.</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "create_after_node_placed_upsidedown_handler"></a>
<strong>create_after_node_placed_upsidedown_handler (pseudo_mirroring, needed_pitch)</strong>
</dt>
<dd>
Creates a handler for the after_node_place callback which turns the placed
node upside down if the placer was looking at underside of another node or
if the placer looks upwards.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pseudo_mirroring</span>
Optional. If pseudo mirroring should be performed,
defaults to false.
</li>
<li><span class="parameter">needed_pitch</span>
Optional. The needed pitch to turn the node upside down,
defaults to 0.45.
</li>
</ul>
<h3>Returns:</h3>
<ol>
The handler for the after_node_place callback.
</ol>
</dd>
<dt>
<a name = "get_vector"></a>
<strong>get_vector (id)</strong>
</dt>
<dd>
Gets the vector for the given ID.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">id</span>
The ID for which to get the vector.
</li>
</ul>
<h3>Returns:</h3>
<ol>
The vector for the given ID.
</ol>
</dd>
<dt>
<a name = "to_wallmounted"></a>
<strong>to_wallmounted (facedir_id)</strong>
</dt>
<dd>
Gets the corresponding wallmounted value for the given facedir value.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">facedir_id</span>
The facedir value/ID.
</li>
</ul>
<h3>Returns:</h3>
<ol>
The wallmounted value/ID.
</ol>
</dd>
<dt>
<a name = "upsidedown"></a>
<strong>upsidedown (facedir, pseudo_mirroring)</strong>
</dt>
<dd>
Gets the facedir for the given rotation as upside down.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">facedir</span>
The facedir value.
</li>
<li><span class="parameter">pseudo_mirroring</span>
Optional. Performs rotations to imitate mirroring
of the node, defaults to false.
</li>
</ul>
<h3>Returns:</h3>
<ol>
The facedir value upside down.
</ol>
</dd>
</dl>
<h2><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "NEGATIVE_X_VECTOR"></a>
<strong>NEGATIVE_X_VECTOR</strong>
</dt>
<dd>
The vector for the negative x direction.
<h3>Fields:</h3>
<ul>
<li><span class="parameter">x</span>
</li>
<li><span class="parameter">y</span>
</li>
<li><span class="parameter">z</span>
</li>
</ul>
</dd>
<dt>
<a name = "NEGATIVE_Z_VECTOR"></a>
<strong>NEGATIVE_Z_VECTOR</strong>
</dt>
<dd>
The vector for the negative z direction.
<h3>Fields:</h3>
<ul>
<li><span class="parameter">x</span>
</li>
<li><span class="parameter">y</span>
</li>
<li><span class="parameter">z</span>
</li>
</ul>
</dd>
<dt>
<a name = "POSITIVE_X_VECTOR"></a>
<strong>POSITIVE_X_VECTOR</strong>
</dt>
<dd>
The vector for the positive x direction.
<h3>Fields:</h3>
<ul>
<li><span class="parameter">x</span>
</li>
<li><span class="parameter">y</span>
</li>
<li><span class="parameter">z</span>
</li>
</ul>
</dd>
<dt>
<a name = "POSITIVE_Z_VECTOR"></a>
<strong>POSITIVE_Z_VECTOR</strong>
</dt>
<dd>
The vector for the positive z direction.
<h3>Fields:</h3>
<ul>
<li><span class="parameter">x</span>
</li>
<li><span class="parameter">y</span>
</li>
<li><span class="parameter">z</span>
</li>
</ul>
</dd>
</dl>
<h2><a name="Fields"></a>Fields</h2>
<dl class="function">
<dt>
<a name = "NEGATIVE_X"></a>
<strong>NEGATIVE_X</strong>
</dt>
<dd>
Attached to the node in the negative x direction.
</dd>
<dt>
<a name = "NEGATIVE_Z"></a>
<strong>NEGATIVE_Z</strong>
</dt>
<dd>
Attached to the node in the negative z direction.
</dd>
<dt>
<a name = "POSITIVE_X"></a>
<strong>POSITIVE_X</strong>
</dt>
<dd>
Attached to the node in the positive x direction.
</dd>
<dt>
<a name = "POSITIVE_Z"></a>
<strong>POSITIVE_Z</strong>
</dt>
<dd>
Attached to the node in the positive z direction.
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.2</a></i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>