walkmap/docs/codox/walkmap.edge.html

10 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>walkmap.edge 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 current"><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"><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.edge.html#var-centre"><div class="inner"><span>centre</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-collinear2d.3F"><div class="inner"><span>collinear2d?</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-collinear.3F"><div class="inner"><span>collinear?</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-edge"><div class="inner"><span>edge</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-edge.3F"><div class="inner"><span>edge?</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-intersection2d"><div class="inner"><span>intersection2d</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-length"><div class="inner"><span>length</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-minimaxd"><div class="inner"><span>minimaxd</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-on2d.3F"><div class="inner"><span>on2d?</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-on.3F"><div class="inner"><span>on?</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-orientation"><div class="inner"><span>orientation</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-overlaps2d.3F"><div class="inner"><span>overlaps2d?</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-parallel.3F"><div class="inner"><span>parallel?</span></div></a></li><li class="depth-1"><a href="walkmap.edge.html#var-unit-vector"><div class="inner"><span>unit-vector</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">walkmap.edge</h1><div class="doc"><div class="markdown"><p>Essentially the specification for things we shall consider to be an edge. An edge is a line segment having just a start and an end, with no intervening nodes.</p></div></div><div class="public anchor" id="var-centre"><h3>centre</h3><div class="usage"><code>(centre edge)</code></div><div class="doc"><div class="markdown"><p>Return the vertex that represents the centre of this <code>edge</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L39">view source</a></div></div><div class="public anchor" id="var-collinear2d.3F"><h3>collinear2d?</h3><div class="usage"><code>(collinear2d? e1 e2)</code></div><div class="doc"><div class="markdown"><p>True if the projections of edges <code>e1</code>, <code>e2</code> onto the x, y plane are collinear.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L82">view source</a></div></div><div class="public anchor" id="var-collinear.3F"><h3>collinear?</h3><div class="usage"><code>(collinear? e1 e2)</code></div><div class="doc"><div class="markdown"><p>True if edges <code>e1</code> and <code>e2</code> are collinear with one another.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L74">view source</a></div></div><div class="public anchor" id="var-edge"><h3>edge</h3><div class="usage"><code>(edge v1 v2)</code></div><div class="doc"><div class="markdown"><p>Return an edge between vertices <code>v1</code> and <code>v2</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L9">view source</a></div></div><div class="public anchor" id="var-edge.3F"><h3>edge?</h3><div class="usage"><code>(edge? o)</code></div><div class="doc"><div class="markdown"><p>True if <code>o</code> satisfies the conditions for a edge. An edge shall be a map having the keys <code>:start</code> and <code>:end</code>, such that the values of each of those keys shall be a vertex.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L17">view source</a></div></div><div class="public anchor" id="var-intersection2d"><h3>intersection2d</h3><div class="usage"><code>(intersection2d e1 e2)</code></div><div class="doc"><div class="markdown"><p>The probability of two lines intersecting in 3d space is low, and actually that is mostly not something were interested in. Were interested in intersection in the <code>x,y</code> plane. This function returns a vertex representing a point vertically over the intersection of edges <code>e1</code>, <code>e2</code> in the <code>x,y</code> plane, whose <code>z</code> coordinate is</p>
<ul>
<li>0 if both edges are 2d (i.e. have missing or zero <code>z</code> coordinates);</li>
<li>if one edge is 2d, then the point on the other edge over the intersection;</li>
<li>otherwise, the average of the z coordinates of the points on the two edges over the intersection.</li>
</ul>
<p>If no such intersection exists, <code>nil</code> is returned.</p>
<p>It is an error, and an exception will be thrown, if either <code>e1</code> or <code>e2</code> is not an edge.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L139">view source</a></div></div><div class="public anchor" id="var-length"><h3>length</h3><div class="usage"><code>(length e)</code></div><div class="doc"><div class="markdown"><p>Return the length of the edge <code>e</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L27">view source</a></div></div><div class="public anchor" id="var-minimaxd"><h3>minimaxd</h3><div class="usage"><code>(minimaxd edge coord f)</code></div><div class="doc"><div class="markdown"><p>Apply function <code>f</code> to <code>coord</code> of the vertices at start and end of <code>edge</code> and return the result. Intended use case is <code>f</code> = <code>min</code> or <code>max</code>, <code>coord</code> is <code>:x</code>, <code>:y</code> or <code>:z</code>. No checks are made for sane arguments.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L89">view source</a></div></div><div class="public anchor" id="var-on2d.3F"><h3>on2d?</h3><div class="usage"><code>(on2d? e v)</code></div><div class="doc"><div class="markdown"><p>True if vertex <code>v</code> is on edge <code>e</code> when projected onto the x, y plane.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L111">view source</a></div></div><div class="public anchor" id="var-on.3F"><h3>on?</h3><div class="usage"><code>(on? e v)</code></div><div class="doc"><div class="markdown"><p>True if the vertex <code>v</code> is on the edge <code>e</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L96">view source</a></div></div><div class="public anchor" id="var-orientation"><h3>orientation</h3><div class="usage"><code>(orientation p q r)</code></div><div class="doc"><div class="markdown"><p>Determine whether the ordered sequence of vertices <code>p</code>, <code>q</code> and <code>r</code> run clockwise, collinear or anticlockwise in the x,y plane.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L127">view source</a></div></div><div class="public anchor" id="var-overlaps2d.3F"><h3>overlaps2d?</h3><div class="usage"><code>(overlaps2d? e1 e2)</code></div><div class="doc"><div class="markdown"><p>True if the recangle in the x,y plane bisected by edge <code>e1</code> overlaps that bisected by edge <code>e2</code>. It is an error if either <code>e1</code> or <code>e2</code> is not an edge.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L116">view source</a></div></div><div class="public anchor" id="var-parallel.3F"><h3>parallel?</h3><div class="usage"><code>(parallel? &amp; edges)</code></div><div class="doc"><div class="markdown"><p>True if all <code>edges</code> passed are parallel with one another.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L64">view source</a></div></div><div class="public anchor" id="var-unit-vector"><h3>unit-vector</h3><div class="usage"><code>(unit-vector e)</code></div><div class="doc"><div class="markdown"><p>Return an vertex parallel to <code>e</code> starting from the coordinate origin. Two edges which are parallel will have the same unit vector.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/edge.clj#L50">view source</a></div></div></div></body></html>