UNPKG

@flatten-js/boolean-op

Version:
687 lines (210 loc) 8.77 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>Global - Documentation</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#intersect">intersect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#subtract">subtract</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#unify">unify</a></span></li> </nav> <div id="main"> <h1 class="page-title">Global</h1> <section> <header> <h2> </h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Methods</h3> <div class="section-method"> <h4 class="name" id="intersect"><span class="type-signature"></span>intersect<span class="signature">(polygon1, polygon2)</span><span class="type-signature"> &rarr; {Flatten.Polygon}</span></h4> <div class="description"> Intersect two polygons and returns new polygon Point belongs to the resultes polygon is it belongs to the first AND to the second polygon </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="booleanOp.js.html">booleanOp.js</a>, <a href="booleanOp.js.html#line57">line 57</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>polygon1</code></td> <td class="type"> <span class="param-type"><code>Flatten.Polygon</code></span> </td> <td class="description last"> first operand </td> </tr> <tr> <td class="name"><code>polygon2</code></td> <td class="type"> <span class="param-type"><code>Flatten.Polygon</code></span> </td> <td class="description last"> second operand </td> </tr> </tbody> </table> <div class="section-returns"> <h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>Flatten.Polygon</code></span> </dd> </dl> </div> </div> <div class="section-method"> <h4 class="name" id="subtract"><span class="type-signature"></span>subtract<span class="signature">(polygon1, polygon2)</span><span class="type-signature"> &rarr; {Flatten.Polygon}</span></h4> <div class="description"> Subtract second polygon from the first and returns new polygon Point belongs to the resulted polygon if it belongs to the first polygon AND NOT to the second polygon </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="booleanOp.js.html">booleanOp.js</a>, <a href="booleanOp.js.html#line43">line 43</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>polygon1</code></td> <td class="type"> <span class="param-type"><code>Flatten.Polygon</code></span> </td> <td class="description last"> first operand </td> </tr> <tr> <td class="name"><code>polygon2</code></td> <td class="type"> <span class="param-type"><code>Flatten.Polygon</code></span> </td> <td class="description last"> second operand </td> </tr> </tbody> </table> <div class="section-returns"> <h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>Flatten.Polygon</code></span> </dd> </dl> </div> </div> <div class="section-method"> <h4 class="name" id="unify"><span class="type-signature"></span>unify<span class="signature">(polygon1, polygon2)</span><span class="type-signature"> &rarr; {Flatten.Polygon}</span></h4> <div class="description"> Unify two polygons polygons and returns new polygon. <br/> Point belongs to the resulted polygon if it belongs to the first OR to the second polygon </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="booleanOp.js.html">booleanOp.js</a>, <a href="booleanOp.js.html#line31">line 31</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>polygon1</code></td> <td class="type"> <span class="param-type"><code>Flatten.Polygon</code></span> </td> <td class="description last"> first operand </td> </tr> <tr> <td class="name"><code>polygon2</code></td> <td class="type"> <span class="param-type"><code>Flatten.Polygon</code></span> </td> <td class="description last"> second operand </td> </tr> </tbody> </table> <div class="section-returns"> <h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>Flatten.Polygon</code></span> </dd> </dl> </div> </div> </article> </section> </div> <br class="clear"> <footer> Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Mar 31 2019 23:36:02 GMT+0300 (Israel Daylight Time) using the Minami theme. </footer> <script>prettyPrint();</script> <script src="scripts/linenumber.js"></script> </body> </html>