blob: 9fb1b390e814bada896d6886533c4ba8bc732ea1 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>BSPTree (Apache Commons Math 3.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="BSPTree (Apache Commons Math 3.3 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BSPTree.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BoundaryProjection.html" title="class in org.apache.commons.math3.geometry.partitioning"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/commons/math3/geometry/partitioning/BSPTree.html" target="_top">Frames</a></li>
<li><a href="BSPTree.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.math3.geometry.partitioning</div>
<h2 title="Class BSPTree" class="title">Class BSPTree&lt;S extends <a href="../../../../../../org/apache/commons/math3/geometry/Space.html" title="interface in org.apache.commons.math3.geometry">Space</a>&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.math3.geometry.partitioning.BSPTree&lt;S&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>S</code> - Type of the space.</dd></dl>
<hr>
<br>
<pre>public class <span class="strong">BSPTree&lt;S extends <a href="../../../../../../org/apache/commons/math3/geometry/Space.html" title="interface in org.apache.commons.math3.geometry">Space</a>&gt;</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">This class represent a Binary Space Partition tree.
<p>BSP trees are an efficient way to represent space partitions and
to associate attributes with each cell. Each node in a BSP tree
represents a convex region which is partitioned in two convex
sub-regions at each side of a cut hyperplane. The root tree
contains the complete space.</p>
<p>The main use of such partitions is to use a boolean attribute to
define an inside/outside property, hence representing arbitrary
polytopes (line segments in 1D, polygons in 2D and polyhedrons in
3D) and to operate on them.</p>
<p>Another example would be to represent Voronoi tesselations, the
attribute of each cell holding the defining point of the cell.</p>
<p>The application-defined attributes are shared among copied
instances and propagated to split parts. These attributes are not
used by the BSP-tree algorithms themselves, so the application can
use them for any purpose. Since the tree visiting method holds
internal and leaf nodes differently, it is possible to use
different classes for internal nodes attributes and leaf nodes
attributes. This should be used with care, though, because if the
tree is modified in any way after attributes have been set, some
internal nodes may become leaf nodes and some leaf nodes may become
internal nodes.</p>
<p>One of the main sources for the development of this package was
Bruce Naylor, John Amanatides and William Thibault paper <a
href="http://www.cs.yorku.ca/~amana/research/bsptSetOp.pdf">Merging
BSP Trees Yields Polyhedral Set Operations</a> Proc. Siggraph '90,
Computer Graphics 24(4), August 1990, pp 115-124, published by the
Association for Computing Machinery (ACM).</p></div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>3.0</dd>
<dt><span class="strong">Version:</span></dt>
<dd>$Id: BSPTree.java 1560115 2014-01-21 17:49:13Z luc $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTree.LeafMerger</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="type parameter in BSPTree.LeafMerger">S</a> extends <a href="../../../../../../org/apache/commons/math3/geometry/Space.html" title="interface in org.apache.commons.math3.geometry">Space</a>&gt;</strong></code>
<div class="block">This interface gather the merging operations between a BSP tree
leaf and another BSP tree.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree()">BSPTree</a></strong>()</code>
<div class="block">Build a tree having only one root cell representing the whole space.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree(java.lang.Object)">BSPTree</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;attribute)</code>
<div class="block">Build a tree having only one root cell representing the whole space.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree(org.apache.commons.math3.geometry.partitioning.SubHyperplane, org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree, java.lang.Object)">BSPTree</a></strong>(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;cut,
<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;plus,
<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;minus,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;attribute)</code>
<div class="block">Build a BSPTree from its underlying elements.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#copySelf()">copySelf</a></strong>()</code>
<div class="block">Copy the instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getAttribute()">getAttribute</a></strong>()</code>
<div class="block">Get the attribute associated with the instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCell(org.apache.commons.math3.geometry.Point, double)">getCell</a></strong>(<a href="../../../../../../org/apache/commons/math3/geometry/Point.html" title="interface in org.apache.commons.math3.geometry">Point</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;point,
double&nbsp;tolerance)</code>
<div class="block">Get the cell to which a point belongs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCell(org.apache.commons.math3.geometry.Vector)">getCell</a></strong>(<a href="../../../../../../org/apache/commons/math3/geometry/Vector.html" title="interface in org.apache.commons.math3.geometry">Vector</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;point)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>as of 3.3, replaced with <a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCell(org.apache.commons.math3.geometry.Point, double)"><code>getCell(Point, double)</code></a></i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCloseCuts(org.apache.commons.math3.geometry.Point, double)">getCloseCuts</a></strong>(<a href="../../../../../../org/apache/commons/math3/geometry/Point.html" title="interface in org.apache.commons.math3.geometry">Point</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;point,
double&nbsp;maxOffset)</code>
<div class="block">Get the cells whose cut sub-hyperplanes are close to the point.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCut()">getCut</a></strong>()</code>
<div class="block">Get the cut sub-hyperplane.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getMinus()">getMinus</a></strong>()</code>
<div class="block">Get the tree on the minus side of the cut hyperplane.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getParent()">getParent</a></strong>()</code>
<div class="block">Get the parent node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getPlus()">getPlus</a></strong>()</code>
<div class="block">Get the tree on the plus side of the cut hyperplane.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane)">insertCut</a></strong>(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/Hyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">Hyperplane</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;hyperplane)</code>
<div class="block">Insert a cut sub-hyperplane in a node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#insertInTree(org.apache.commons.math3.geometry.partitioning.BSPTree, boolean)">insertInTree</a></strong>(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;parentTree,
boolean&nbsp;isPlusChild)</code>
<div class="block">Insert the instance into another tree.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#merge(org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree.LeafMerger)">merge</a></strong>(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;tree,
<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTree.LeafMerger</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;leafMerger)</code>
<div class="block">Merge a BSP tree with the instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#pruneAroundConvexCell(java.lang.Object, java.lang.Object, java.lang.Object)">pruneAroundConvexCell</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;cellAttribute,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;otherLeafsAttributes,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;internalAttributes)</code>
<div class="block">Prune a tree around a cell.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#setAttribute(java.lang.Object)">setAttribute</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;attribute)</code>
<div class="block">Associate an attribute with the instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#split(org.apache.commons.math3.geometry.partitioning.SubHyperplane)">split</a></strong>(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;sub)</code>
<div class="block">Split a BSP tree by an external sub-hyperplane.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#visit(org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor)">visit</a></strong>(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTreeVisitor.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTreeVisitor</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;visitor)</code>
<div class="block">Visit the BSP tree nodes.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="BSPTree()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BSPTree</h4>
<pre>public&nbsp;BSPTree()</pre>
<div class="block">Build a tree having only one root cell representing the whole space.</div>
</li>
</ul>
<a name="BSPTree(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BSPTree</h4>
<pre>public&nbsp;BSPTree(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;attribute)</pre>
<div class="block">Build a tree having only one root cell representing the whole space.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>attribute</code> - attribute of the tree (may be null)</dd></dl>
</li>
</ul>
<a name="BSPTree(org.apache.commons.math3.geometry.partitioning.SubHyperplane, org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree, java.lang.Object)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BSPTree</h4>
<pre>public&nbsp;BSPTree(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;cut,
<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;plus,
<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;minus,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;attribute)</pre>
<div class="block">Build a BSPTree from its underlying elements.
<p>This method does <em>not</em> perform any verification on
consistency of its arguments, it should therefore be used only
when then caller knows what it is doing.</p>
<p>This method is mainly useful to build trees
bottom-up. Building trees top-down is realized with the help of
method <a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane)"><code>insertCut</code></a>.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cut</code> - cut sub-hyperplane for the tree</dd><dd><code>plus</code> - plus side sub-tree</dd><dd><code>minus</code> - minus side sub-tree</dd><dd><code>attribute</code> - attribute associated with the node (may be null)</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane)"><code>insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane&lt;S&gt;)</code></a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="insertCut(org.apache.commons.math3.geometry.partitioning.Hyperplane)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>insertCut</h4>
<pre>public&nbsp;boolean&nbsp;insertCut(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/Hyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">Hyperplane</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;hyperplane)</pre>
<div class="block">Insert a cut sub-hyperplane in a node.
<p>The sub-tree starting at this node will be completely
overwritten. The new cut sub-hyperplane will be built from the
intersection of the provided hyperplane with the cell. If the
hyperplane does intersect the cell, the cell will have two
children cells with <code>null</code> attributes on each side of
the inserted cut sub-hyperplane. If the hyperplane does not
intersect the cell then <em>no</em> cut hyperplane will be
inserted and the cell will be changed to a leaf cell. The
attribute of the node is never changed.</p>
<p>This method is mainly useful when called on leaf nodes
(i.e. nodes for which <a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCut()"><code>getCut</code></a> returns
<code>null</code>), in this case it provides a way to build a
tree top-down (whereas the <a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree(org.apache.commons.math3.geometry.partitioning.SubHyperplane, org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree, java.lang.Object)"><code>4 arguments constructor</code></a> is devoted to
build trees bottom-up).</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>hyperplane</code> - hyperplane to insert, it will be chopped in
order to fit in the cell defined by the parent nodes of the
instance</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if a cut sub-hyperplane has been inserted (i.e. if
the cell now has two leaf child nodes)</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#BSPTree(org.apache.commons.math3.geometry.partitioning.SubHyperplane, org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree, java.lang.Object)"><code>BSPTree(SubHyperplane, BSPTree, BSPTree, Object)</code></a></dd></dl>
</li>
</ul>
<a name="copySelf()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copySelf</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;copySelf()</pre>
<div class="block">Copy the instance.
<p>The instance created is completely independent of the original
one. A deep copy is used, none of the underlying objects are
shared (except for the nodes attributes and immutable
objects).</p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>a new tree, copy of the instance</dd></dl>
</li>
</ul>
<a name="getCut()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCut</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;getCut()</pre>
<div class="block">Get the cut sub-hyperplane.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>cut sub-hyperplane, null if this is a leaf tree</dd></dl>
</li>
</ul>
<a name="getPlus()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlus</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;getPlus()</pre>
<div class="block">Get the tree on the plus side of the cut hyperplane.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>tree on the plus side of the cut hyperplane, null if this
is a leaf tree</dd></dl>
</li>
</ul>
<a name="getMinus()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinus</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;getMinus()</pre>
<div class="block">Get the tree on the minus side of the cut hyperplane.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>tree on the minus side of the cut hyperplane, null if this
is a leaf tree</dd></dl>
</li>
</ul>
<a name="getParent()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParent</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;getParent()</pre>
<div class="block">Get the parent node.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>parent node, null if the node has no parents</dd></dl>
</li>
</ul>
<a name="setAttribute(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAttribute</h4>
<pre>public&nbsp;void&nbsp;setAttribute(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;attribute)</pre>
<div class="block">Associate an attribute with the instance.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>attribute</code> - attribute to associate with the node</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getAttribute()"><code>getAttribute()</code></a></dd></dl>
</li>
</ul>
<a name="getAttribute()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAttribute</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;getAttribute()</pre>
<div class="block">Get the attribute associated with the instance.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>attribute associated with the node or null if no
attribute has been explicitly set using the <a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#setAttribute(java.lang.Object)"><code>setAttribute</code></a> method</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#setAttribute(java.lang.Object)"><code>setAttribute(java.lang.Object)</code></a></dd></dl>
</li>
</ul>
<a name="visit(org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>visit</h4>
<pre>public&nbsp;void&nbsp;visit(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTreeVisitor.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTreeVisitor</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;visitor)</pre>
<div class="block">Visit the BSP tree nodes.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>visitor</code> - object visiting the tree nodes</dd></dl>
</li>
</ul>
<a name="getCell(org.apache.commons.math3.geometry.Vector)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCell</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;getCell(<a href="../../../../../../org/apache/commons/math3/geometry/Vector.html" title="interface in org.apache.commons.math3.geometry">Vector</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;point)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>as of 3.3, replaced with <a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html#getCell(org.apache.commons.math3.geometry.Point, double)"><code>getCell(Point, double)</code></a></i></div>
<div class="block">Get the cell to which a point belongs.
<p>If the returned cell is a leaf node the points belongs to the
interior of the node, if the cell is an internal node the points
belongs to the node cut sub-hyperplane.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>point</code> - point to check</dd>
<dt><span class="strong">Returns:</span></dt><dd>the tree cell to which the point belongs</dd></dl>
</li>
</ul>
<a name="getCell(org.apache.commons.math3.geometry.Point, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCell</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;getCell(<a href="../../../../../../org/apache/commons/math3/geometry/Point.html" title="interface in org.apache.commons.math3.geometry">Point</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;point,
double&nbsp;tolerance)</pre>
<div class="block">Get the cell to which a point belongs.
<p>If the returned cell is a leaf node the points belongs to the
interior of the node, if the cell is an internal node the points
belongs to the node cut sub-hyperplane.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>point</code> - point to check</dd><dd><code>tolerance</code> - tolerance below which points close to a cut hyperplane
are considered to belong to the hyperplane itself</dd>
<dt><span class="strong">Returns:</span></dt><dd>the tree cell to which the point belongs</dd></dl>
</li>
</ul>
<a name="getCloseCuts(org.apache.commons.math3.geometry.Point, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCloseCuts</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&gt;&nbsp;getCloseCuts(<a href="../../../../../../org/apache/commons/math3/geometry/Point.html" title="interface in org.apache.commons.math3.geometry">Point</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;point,
double&nbsp;maxOffset)</pre>
<div class="block">Get the cells whose cut sub-hyperplanes are close to the point.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>point</code> - point to check</dd><dd><code>maxOffset</code> - offset below which a cut sub-hyperplane is considered
close to the point (in absolute value)</dd>
<dt><span class="strong">Returns:</span></dt><dd>close cells (may be empty if all cut sub-hyperplanes are farther
than maxOffset from the point)</dd></dl>
</li>
</ul>
<a name="merge(org.apache.commons.math3.geometry.partitioning.BSPTree, org.apache.commons.math3.geometry.partitioning.BSPTree.LeafMerger)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>merge</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;merge(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;tree,
<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning">BSPTree.LeafMerger</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;leafMerger)</pre>
<div class="block">Merge a BSP tree with the instance.
<p>All trees are modified (parts of them are reused in the new
tree), it is the responsibility of the caller to ensure a copy
has been done before if any of the former tree should be
preserved, <em>no</em> such copy is done here!</p>
<p>The algorithm used here is directly derived from the one
described in the Naylor, Amanatides and Thibault paper (section
III, Binary Partitioning of a BSP Tree).</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tree</code> - other tree to merge with the instance (will be
<em>unusable</em> after the operation, as well as the
instance itself)</dd><dd><code>leafMerger</code> - object implementing the final merging phase
(this is where the semantic of the operation occurs, generally
depending on the attribute of the leaf node)</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new tree, result of <code>instance &lt;op&gt;
tree</code>, this value can be ignored if parentTree is not null
since all connections have already been established</dd></dl>
</li>
</ul>
<a name="split(org.apache.commons.math3.geometry.partitioning.SubHyperplane)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;split(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;sub)</pre>
<div class="block">Split a BSP tree by an external sub-hyperplane.
<p>Split a tree in two halves, on each side of the
sub-hyperplane. The instance is not modified.</p>
<p>The tree returned is not upward-consistent: despite all of its
sub-trees cut sub-hyperplanes (including its own cut
sub-hyperplane) are bounded to the current cell, it is <em>not</em>
attached to any parent tree yet. This tree is intended to be
later inserted into an higher level tree.</p>
<p>The algorithm used here is the one given in Naylor, Amanatides
and Thibault paper (section III, Binary Partitioning of a BSP
Tree).</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sub</code> - partitioning sub-hyperplane, must be already clipped
to the convex region represented by the instance, will be used as
the cut sub-hyperplane of the returned tree</dd>
<dt><span class="strong">Returns:</span></dt><dd>a tree having the specified sub-hyperplane as its cut
sub-hyperplane, the two parts of the split instance as its two
sub-trees and a null parent</dd></dl>
</li>
</ul>
<a name="insertInTree(org.apache.commons.math3.geometry.partitioning.BSPTree, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>insertInTree</h4>
<pre>public&nbsp;void&nbsp;insertInTree(<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;parentTree,
boolean&nbsp;isPlusChild)</pre>
<div class="block">Insert the instance into another tree.
<p>The instance itself is modified so its former parent should
not be used anymore.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>parentTree</code> - parent tree to connect to (may be null)</dd><dd><code>isPlusChild</code> - if true and if parentTree is not null, the
resulting tree should be the plus child of its parent, ignored if
parentTree is null</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning"><code>BSPTree.LeafMerger</code></a></dd></dl>
</li>
</ul>
<a name="pruneAroundConvexCell(java.lang.Object, java.lang.Object, java.lang.Object)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>pruneAroundConvexCell</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</a>&lt;<a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="type parameter in BSPTree">S</a>&gt;&nbsp;pruneAroundConvexCell(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;cellAttribute,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;otherLeafsAttributes,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;internalAttributes)</pre>
<div class="block">Prune a tree around a cell.
<p>
This method can be used to extract a convex cell from a tree.
The original cell may either be a leaf node or an internal node.
If it is an internal node, it's subtree will be ignored (i.e. the
extracted cell will be a leaf node in all cases). The original
tree to which the original cell belongs is not touched at all,
a new independent tree will be built.
</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cellAttribute</code> - attribute to set for the leaf node
corresponding to the initial instance cell</dd><dd><code>otherLeafsAttributes</code> - attribute to set for the other leaf
nodes</dd><dd><code>internalAttributes</code> - attribute to set for the internal nodes</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new tree (the original tree is left untouched) containing
a single branch with the cell as a leaf node, and other leaf nodes
as the remnants of the pruned branches</dd><dt><span class="strong">Since:</span></dt>
<dd>3.3</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BSPTree.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BoundaryProjection.html" title="class in org.apache.commons.math3.geometry.partitioning"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.LeafMerger.html" title="interface in org.apache.commons.math3.geometry.partitioning"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/commons/math3/geometry/partitioning/BSPTree.html" target="_top">Frames</a></li>
<li><a href="BSPTree.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2003&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>