5 lines
8.2 KiB
HTML
5 lines
8.2 KiB
HTML
<!DOCTYPE html PUBLIC ""
|
||
"">
|
||
<html><head><meta charset="UTF-8" /><title>walkmap.vertex documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Walkmap</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="dali-performance.html"><div class="inner"><span>Dali performance</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction to walkmap</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>walkmap</span></div></div></li><li class="depth-2 branch"><a href="walkmap.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="walkmap.edge.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>edge</span></div></a></li><li class="depth-2 branch"><a href="walkmap.geometry.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>geometry</span></div></a></li><li class="depth-2 branch"><a href="walkmap.ocean.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ocean</span></div></a></li><li class="depth-2 branch"><a href="walkmap.path.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>path</span></div></a></li><li class="depth-2 branch"><a href="walkmap.polygon.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>polygon</span></div></a></li><li class="depth-2 branch"><a href="walkmap.stl.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>stl</span></div></a></li><li class="depth-2 branch"><a href="walkmap.superstructure.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>superstructure</span></div></a></li><li class="depth-2 branch"><a href="walkmap.svg.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>svg</span></div></a></li><li class="depth-2 branch"><a href="walkmap.tag.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tag</span></div></a></li><li class="depth-2 branch"><a href="walkmap.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2 current"><a href="walkmap.vertex.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vertex</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="walkmap.vertex.html#var-canonicalise-vertex"><div class="inner"><span>canonicalise-vertex</span></div></a></li><li class="depth-1"><a href="walkmap.vertex.html#var-ensure2d"><div class="inner"><span>ensure2d</span></div></a></li><li class="depth-1"><a href="walkmap.vertex.html#var-ensure3d"><div class="inner"><span>ensure3d</span></div></a></li><li class="depth-1"><a href="walkmap.vertex.html#var-make-vertex"><div class="inner"><span>make-vertex</span></div></a></li><li class="depth-1"><a href="walkmap.vertex.html#var-vertex-key"><div class="inner"><span>vertex-key</span></div></a></li><li class="depth-1"><a href="walkmap.vertex.html#var-vertex.3F"><div class="inner"><span>vertex?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">walkmap.vertex</h1><div class="doc"><div class="markdown"><p>Essentially the specification for things we shall consider to be vertices.</p></div></div><div class="public anchor" id="var-canonicalise-vertex"><h3>canonicalise-vertex</h3><div class="usage"><code>(canonicalise-vertex o)</code></div><div class="doc"><div class="markdown"><p>If <code>o</code> is a map with numeric values for <code>:x</code>, <code>:y</code> and optionally <code>:z</code>, upgrade it to something we will recognise as a vertex.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/vertex.clj#L43">view source</a></div></div><div class="public anchor" id="var-ensure2d"><h3>ensure2d</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>If <code>o</code> is a vertex, set its <code>:z</code> value to zero; else throw an exception.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/vertex.clj#L72">view source</a></div></div><div class="public anchor" id="var-ensure3d"><h3>ensure3d</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a vertex <code>o</code>, if <code>o</code> has a <code>:z</code> value, just return <code>o</code>; otherwise return a vertex like <code>o</code> but having thie <code>dflt</code> value as the value of its <code>:z</code> key, or zero as the value of its <code>:z</code> key if <code>dflt</code> is not specified.</p>
|
||
<p>If <code>o</code> is not a vertex, throws an exception.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/vertex.clj#L56">view source</a></div></div><div class="public anchor" id="var-make-vertex"><h3>make-vertex</h3><div class="usage"><code>(make-vertex x y)</code><code>(make-vertex x y z)</code></div><div class="doc"><div class="markdown"><p>Make a vertex with this <code>x</code>, <code>y</code> and (if provided) <code>z</code> values. Returns a map with those values, plus a unique <code>:id</code> value, and <code>:kind</code> set to <code>:vertex</code>. It’s not necessary to use this function to create a vertex, but the <code>:id</code> must be present and must be unique.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/vertex.clj#L32">view source</a></div></div><div class="public anchor" id="var-vertex-key"><h3>vertex-key</h3><div class="usage"><code>(vertex-key o)</code></div><div class="doc"><div class="markdown"><p>Making sure we get the same key everytime we key a vertex with the same coordinates. <code>o</code> must have numeric values for <code>:x</code>, <code>:y</code>, and optionally <code>:z</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/vertex.clj#L4">view source</a></div></div><div class="public anchor" id="var-vertex.3F"><h3>vertex?</h3><div class="usage"><code>(vertex? o)</code></div><div class="doc"><div class="markdown"><p>True if <code>o</code> satisfies the conditions for a vertex. That is, essentially, that it must rerpresent a two- or three- dimensional vector. A vertex is shall be a map having at least the keys <code>:x</code> and <code>:y</code>, where the value of those keys is a number. If the key <code>:z</code> is also present, its value must also be a number.</p>
|
||
<p>The name <code>vector?</code> was not used as that would clash with a function of that name in <code>clojure.core</code> whose semantics are entirely different.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/vertex.clj#L14">view source</a></div></div></div></body></html> |