<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>VTK: dox/Filtering/vtkKdTree.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>dox/Filtering/vtkKdTree.h</h1><a href="a02299.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span> <a name="l00002"></a>00002 <span class="comment"></span> <a name="l00003"></a>00003 <span class="comment"> Program: Visualization Toolkit</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: vtkKdTree.h,v $</span> <a name="l00005"></a>00005 <span class="comment"></span> <a name="l00006"></a>00006 <span class="comment"> Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span> <a name="l00007"></a>00007 <span class="comment"> All rights reserved.</span> <a name="l00008"></a>00008 <span class="comment"> See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="comment"> This software is distributed WITHOUT ANY WARRANTY; without even</span> <a name="l00011"></a>00011 <span class="comment"> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span> <a name="l00012"></a>00012 <span class="comment"> PURPOSE. See the above copyright notice for more information.</span> <a name="l00013"></a>00013 <span class="comment"></span> <a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span> <a name="l00015"></a>00015 <span class="comment">/*----------------------------------------------------------------------------</span> <a name="l00016"></a>00016 <span class="comment"> Copyright (c) Sandia Corporation</span> <a name="l00017"></a>00017 <span class="comment"> See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.</span> <a name="l00018"></a>00018 <span class="comment">----------------------------------------------------------------------------*/</span> <a name="l00019"></a>00019 <a name="l00061"></a>00061 <span class="preprocessor">#ifndef __vtkKdTree_h</span> <a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define __vtkKdTree_h</span> <a name="l00063"></a>00063 <span class="preprocessor"></span> <a name="l00064"></a>00064 <span class="preprocessor">#include "<a class="code" href="a02303.html">vtkLocator.h</a>"</span> <a name="l00065"></a>00065 <a name="l00066"></a>00066 <span class="keyword">class </span><a class="code" href="a01715.html" title="Timer support and logging.">vtkTimerLog</a>; <a name="l00067"></a>00067 <span class="keyword">class </span><a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a>; <a name="l00068"></a>00068 <span class="keyword">class </span><a class="code" href="a00722.html" title="dynamic, self-adjusting array of vtkIdType">vtkIdTypeArray</a>; <a name="l00069"></a>00069 <span class="keyword">class </span><a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a>; <a name="l00070"></a>00070 <span class="keyword">class </span><a class="code" href="a01251.html" title="abstract class for specifying dataset behavior">vtkPointSet</a>; <a name="l00071"></a>00071 <span class="keyword">class </span><a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>; <a name="l00072"></a>00072 <span class="keyword">class </span><a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a>; <a name="l00073"></a>00073 <span class="keyword">class </span><a class="code" href="a00240.html" title="abstract class to specify cell behavior">vtkCell</a>; <a name="l00074"></a>00074 <span class="keyword">class </span><a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a>; <a name="l00075"></a>00075 <span class="keyword">class </span><a class="code" href="a00217.html" title="This class represents an axis-aligned Binary Spatial Partitioning of a 3D space.">vtkBSPCuts</a>; <a name="l00076"></a>00076 <span class="keyword">class </span><a class="code" href="a00218.html" title="Perform calculations (mostly intersection calculations) on regions of a 3D binary...">vtkBSPIntersections</a>; <a name="l00077"></a>00077 <span class="keyword">class </span><a class="code" href="a00378.html" title="maintain an unordered list of dataset objects">vtkDataSetCollection</a>; <a name="l00078"></a>00078 <a name="l00079"></a><a class="code" href="a00933.html">00079</a> <span class="keyword">class </span><a class="code" href="a02170.html#95ced7977a6b6b1bf9f38bf04e3835b6">VTK_FILTERING_EXPORT</a> <a class="code" href="a00933.html" title="a Kd-tree spatial decomposition of a set of points">vtkKdTree</a> : <span class="keyword">public</span> <a class="code" href="a00971.html" title="abstract base class for objects that accelerate spatial searches">vtkLocator</a> <a name="l00080"></a>00080 { <a name="l00081"></a>00081 <span class="keyword">public</span>: <a name="l00082"></a><a class="code" href="a00933.html#ba860abec2f7a8712a48826bdf055989">00082</a> vtkTypeRevisionMacro(<a class="code" href="a00933.html" title="a Kd-tree spatial decomposition of a set of points">vtkKdTree</a>, <a class="code" href="a00971.html" title="abstract base class for objects that accelerate spatial searches">vtkLocator</a>); <a name="l00083"></a>00083 <span class="keywordtype">void</span> <a class="code" href="a00971.html#e8661aa7fe43687556be27eeecd3ae1d">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00084"></a>00084 <a name="l00085"></a>00085 <span class="keyword">static</span> <a class="code" href="a00933.html" title="a Kd-tree spatial decomposition of a set of points">vtkKdTree</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>(); <a name="l00086"></a>00086 <a name="l00088"></a>00088 <a name="l00089"></a>00089 vtkBooleanMacro(Timing, <span class="keywordtype">int</span>); <a name="l00090"></a>00090 vtkSetMacro(Timing, <span class="keywordtype">int</span>); <a name="l00091"></a>00091 vtkGetMacro(Timing, <span class="keywordtype">int</span>); <a name="l00093"></a>00093 <a name="l00095"></a>00095 <a name="l00096"></a>00096 vtkSetMacro(MinCells, <span class="keywordtype">int</span>); <a name="l00097"></a>00097 vtkGetMacro(MinCells, <span class="keywordtype">int</span>); <a name="l00099"></a>00099 <a name="l00104"></a>00104 vtkGetMacro(NumberOfRegionsOrLess, <span class="keywordtype">int</span>); <a name="l00105"></a>00105 vtkSetMacro(NumberOfRegionsOrLess, <span class="keywordtype">int</span>); <a name="l00106"></a>00106 <a name="l00111"></a>00111 vtkGetMacro(NumberOfRegionsOrMore, <span class="keywordtype">int</span>); <a name="l00112"></a>00112 vtkSetMacro(NumberOfRegionsOrMore, <span class="keywordtype">int</span>); <a name="l00113"></a>00113 <a name="l00119"></a>00119 vtkGetMacro(FudgeFactor, <span class="keywordtype">double</span>); <a name="l00120"></a>00120 vtkSetMacro(FudgeFactor, <span class="keywordtype">double</span>); <a name="l00121"></a>00121 <a name="l00125"></a>00125 vtkGetObjectMacro(Cuts, <a class="code" href="a00217.html" title="This class represents an axis-aligned Binary Spatial Partitioning of a 3D space.">vtkBSPCuts</a>); <a name="l00126"></a>00126 <a name="l00131"></a>00131 <span class="keywordtype">void</span> SetCuts(<a class="code" href="a00217.html" title="This class represents an axis-aligned Binary Spatial Partitioning of a 3D space.">vtkBSPCuts</a> *cuts); <a name="l00132"></a>00132 <a name="l00134"></a>00134 <span class="keywordtype">void</span> OmitXPartitioning(); <a name="l00135"></a>00135 <a name="l00137"></a>00137 <span class="keywordtype">void</span> OmitYPartitioning(); <a name="l00138"></a>00138 <a name="l00140"></a>00140 <span class="keywordtype">void</span> OmitZPartitioning(); <a name="l00141"></a>00141 <a name="l00143"></a>00143 <span class="keywordtype">void</span> OmitXYPartitioning(); <a name="l00144"></a>00144 <a name="l00146"></a>00146 <span class="keywordtype">void</span> OmitYZPartitioning(); <a name="l00147"></a>00147 <a name="l00149"></a>00149 <span class="keywordtype">void</span> OmitZXPartitioning(); <a name="l00150"></a>00150 <a name="l00152"></a>00152 <span class="keywordtype">void</span> OmitNoPartitioning(); <a name="l00153"></a>00153 <a name="l00163"></a>00163 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00971.html#3622fbb0a4668007e69892c75f4edd7d">SetDataSet</a>(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>); <a name="l00164"></a>00164 <a name="l00168"></a>00168 <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddDataSet(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>); <a name="l00169"></a>00169 <a name="l00171"></a>00171 <a name="l00172"></a>00172 <span class="keyword">virtual</span> <span class="keywordtype">void</span> RemoveDataSet(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e519c5019582479480124c44722a451f">index</a>); <a name="l00173"></a>00173 <span class="keyword">virtual</span> <span class="keywordtype">void</span> RemoveDataSet(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>); <a name="l00174"></a>00174 <span class="keyword">virtual</span> <span class="keywordtype">void</span> RemoveAllDataSets(); <a name="l00176"></a>00176 <a name="l00178"></a>00178 <span class="keywordtype">int</span> GetNumberOfDataSets(); <a name="l00179"></a>00179 <a name="l00185"></a>00185 <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<a class="code" href="a00971.html#0d81258562ecfc8cc5700e062a95959b">GetDataSet</a>(<span class="keywordtype">int</span> n); <a name="l00186"></a>00186 <a name="l00189"></a><a class="code" href="a00933.html#fe493d784bfa566475c338f526705334">00189</a> <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<a class="code" href="a00971.html#0d81258562ecfc8cc5700e062a95959b">GetDataSet</a>(){ <span class="keywordflow">return</span> this-><a class="code" href="a00971.html#0d81258562ecfc8cc5700e062a95959b">GetDataSet</a>(0); } <a name="l00190"></a>00190 <a name="l00192"></a>00192 <a name="l00193"></a>00193 vtkGetObjectMacro(DataSets, <a class="code" href="a00378.html" title="maintain an unordered list of dataset objects">vtkDataSetCollection</a>); <a name="l00195"></a>00195 <a name="l00198"></a>00198 <span class="keywordtype">int</span> GetDataSetIndex(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>); <a name="l00199"></a>00199 <a name="l00202"></a>00202 <span class="keywordtype">void</span> GetBounds(<span class="keywordtype">double</span> *bounds); <a name="l00203"></a>00203 <a name="l00210"></a>00210 <span class="keywordtype">void</span> SetNewBounds(<span class="keywordtype">double</span> *bounds); <a name="l00211"></a>00211 <a name="l00213"></a>00213 <a name="l00214"></a>00214 vtkGetMacro(NumberOfRegions, <span class="keywordtype">int</span>); <a name="l00216"></a>00216 <a name="l00218"></a>00218 <span class="keywordtype">void</span> GetRegionBounds(<span class="keywordtype">int</span> regionID, <span class="keywordtype">double</span> bounds[6]); <a name="l00219"></a>00219 <a name="l00221"></a>00221 <span class="keywordtype">void</span> GetRegionDataBounds(<span class="keywordtype">int</span> regionID, <span class="keywordtype">double</span> bounds[6]); <a name="l00222"></a>00222 <a name="l00224"></a>00224 <a name="l00225"></a>00225 <span class="keywordtype">void</span> PrintTree(); <a name="l00226"></a>00226 <span class="keywordtype">void</span> PrintVerboseTree(); <a name="l00228"></a>00228 <a name="l00230"></a>00230 <span class="keywordtype">void</span> PrintRegion(<span class="keywordtype">int</span> <span class="keywordtype">id</span>); <a name="l00231"></a>00231 <a name="l00240"></a>00240 <span class="keywordtype">void</span> CreateCellLists(<span class="keywordtype">int</span> dataSetIndex, <span class="keywordtype">int</span> *regionReqList, <a name="l00241"></a>00241 <span class="keywordtype">int</span> reqListSize); <a name="l00242"></a>00242 <span class="keywordtype">void</span> CreateCellLists(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>, <span class="keywordtype">int</span> *regionReqList, <a name="l00243"></a>00243 <span class="keywordtype">int</span> reqListSize); <a name="l00244"></a>00244 <span class="keywordtype">void</span> CreateCellLists(<span class="keywordtype">int</span> *regionReqList, <span class="keywordtype">int</span> listSize); <a name="l00245"></a>00245 <span class="keywordtype">void</span> CreateCellLists(); <a name="l00246"></a>00246 <a name="l00248"></a>00248 <a name="l00252"></a>00252 vtkSetMacro(IncludeRegionBoundaryCells, <span class="keywordtype">int</span>); <a name="l00253"></a>00253 vtkGetMacro(IncludeRegionBoundaryCells, <span class="keywordtype">int</span>); <a name="l00254"></a>00254 vtkBooleanMacro(IncludeRegionBoundaryCells, <span class="keywordtype">int</span>); <a name="l00256"></a>00256 <a name="l00258"></a>00258 <span class="keywordtype">void</span> DeleteCellLists(); <a name="l00259"></a>00259 <a name="l00262"></a>00262 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *GetCellList(<span class="keywordtype">int</span> regionID); <a name="l00263"></a>00263 <a name="l00271"></a>00271 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *GetBoundaryCellList(<span class="keywordtype">int</span> regionID); <a name="l00272"></a>00272 <a name="l00274"></a>00274 <a name="l00288"></a>00288 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> GetCellLists(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *regions, <span class="keywordtype">int</span> <span class="keyword">set</span>, <a name="l00289"></a>00289 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *inRegionCells, <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *onBoundaryCells); <a name="l00290"></a>00290 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> GetCellLists(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *regions, <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>, <a name="l00291"></a>00291 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *inRegionCells, <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *onBoundaryCells); <a name="l00292"></a>00292 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> GetCellLists(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *regions, <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *inRegionCells, <a name="l00293"></a>00293 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *onBoundaryCells); <a name="l00295"></a>00295 <a name="l00297"></a>00297 <a name="l00300"></a>00300 <span class="keywordtype">int</span> GetRegionContainingCell(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> cellID); <a name="l00301"></a>00301 <span class="keywordtype">int</span> GetRegionContainingCell(<span class="keywordtype">int</span> <span class="keyword">set</span>, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> cellID); <a name="l00302"></a>00302 <span class="keywordtype">int</span> GetRegionContainingCell(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> cellID); <a name="l00304"></a>00304 <a name="l00309"></a>00309 <span class="keywordtype">int</span> *AllGetRegionContainingCell(); <a name="l00310"></a>00310 <a name="l00312"></a>00312 <span class="keywordtype">int</span> GetRegionContainingPoint(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z); <a name="l00313"></a>00313 <a name="l00317"></a>00317 <span class="keywordtype">void</span> <a class="code" href="a00971.html#da245e189ce4efa881d856d7949a71db">BuildLocator</a>(); <a name="l00318"></a>00318 <a name="l00330"></a>00330 <span class="keywordtype">int</span> MinimalNumberOfConvexSubRegions(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *regionIdList, <a name="l00331"></a>00331 <span class="keywordtype">double</span> **convexRegionBounds); <a name="l00332"></a>00332 <a name="l00335"></a>00335 VTK_LEGACY(<span class="keywordtype">int</span> DepthOrderAllRegions(<span class="keywordtype">double</span> *dop, <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *orderedList)); <a name="l00336"></a>00336 <a name="l00338"></a>00338 <a name="l00340"></a>00340 VTK_LEGACY(<span class="keywordtype">int</span> DepthOrderRegions(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *regionIds, <span class="keywordtype">double</span> *dop, <a name="l00341"></a>00341 <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *orderedList)); <a name="l00343"></a>00343 <a name="l00345"></a>00345 <a name="l00351"></a>00351 <span class="keywordtype">int</span> ViewOrderAllRegionsInDirection(<span class="keyword">const</span> <span class="keywordtype">double</span> directionOfProjection[3], <a name="l00352"></a>00352 <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *orderedList); <a name="l00354"></a>00354 <a name="l00356"></a>00356 <a name="l00361"></a>00361 <span class="keywordtype">int</span> ViewOrderRegionsInDirection(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *regionIds, <a name="l00362"></a>00362 <span class="keyword">const</span> <span class="keywordtype">double</span> directionOfProjection[3], <a name="l00363"></a>00363 <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *orderedList); <a name="l00365"></a>00365 <a name="l00367"></a>00367 <a name="l00373"></a>00373 <span class="keywordtype">int</span> ViewOrderAllRegionsFromPosition(<span class="keyword">const</span> <span class="keywordtype">double</span> directionOfProjection[3], <a name="l00374"></a>00374 <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *orderedList); <a name="l00376"></a>00376 <a name="l00378"></a>00378 <a name="l00383"></a>00383 <span class="keywordtype">int</span> ViewOrderRegionsFromPosition(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *regionIds, <a name="l00384"></a>00384 <span class="keyword">const</span> <span class="keywordtype">double</span> directionOfProjection[3], <a name="l00385"></a>00385 <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *orderedList); <a name="l00387"></a>00387 <a name="l00389"></a>00389 <a name="l00397"></a>00397 <span class="keywordtype">void</span> BuildLocatorFromPoints(<a class="code" href="a01251.html" title="abstract class for specifying dataset behavior">vtkPointSet</a> *pointset); <a name="l00398"></a>00398 <span class="keywordtype">void</span> BuildLocatorFromPoints(<a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *ptArray); <a name="l00399"></a>00399 <span class="keywordtype">void</span> BuildLocatorFromPoints(<a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> **ptArray, <span class="keywordtype">int</span> numPtArrays); <a name="l00401"></a>00401 <a name="l00411"></a>00411 <a class="code" href="a00722.html" title="dynamic, self-adjusting array of vtkIdType">vtkIdTypeArray</a> *BuildMapForDuplicatePoints(<span class="keywordtype">float</span> tolerance); <a name="l00412"></a>00412 <a name="l00414"></a>00414 <a name="l00417"></a>00417 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> FindPoint(<span class="keywordtype">double</span> *x); <a name="l00418"></a>00418 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> FindPoint(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z); <a name="l00420"></a>00420 <a name="l00422"></a>00422 <a name="l00425"></a>00425 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> FindClosestPoint(<span class="keywordtype">double</span> *x, <span class="keywordtype">double</span> &dist2); <a name="l00426"></a>00426 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> FindClosestPoint(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z, <span class="keywordtype">double</span> &dist2); <a name="l00428"></a>00428 <a name="l00430"></a>00430 <a name="l00433"></a>00433 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> FindClosestPointWithinRadius( <a name="l00434"></a>00434 <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c88c373494669189048f82ee86af5852">radius</a>, <span class="keyword">const</span> <span class="keywordtype">double</span> x[3], <span class="keywordtype">double</span>& dist2); <a name="l00436"></a>00436 <a name="l00438"></a>00438 <a name="l00441"></a>00441 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> FindClosestPointInRegion(<span class="keywordtype">int</span> regionId, <span class="keywordtype">double</span> *x, <span class="keywordtype">double</span> &dist2); <a name="l00442"></a>00442 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> FindClosestPointInRegion(<span class="keywordtype">int</span> regionId, <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z, <a name="l00443"></a>00443 <span class="keywordtype">double</span> &dist2); <a name="l00445"></a>00445 <a name="l00450"></a>00450 <span class="keywordtype">void</span> FindPointsWithinRadius(<span class="keywordtype">double</span> R, <span class="keyword">const</span> <span class="keywordtype">double</span> x[3], <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *result); <a name="l00451"></a>00451 <a name="l00458"></a>00458 <span class="keywordtype">void</span> FindClosestNPoints(<span class="keywordtype">int</span> N, <span class="keyword">const</span> <span class="keywordtype">double</span> x[3], <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *result); <a name="l00459"></a>00459 <a name="l00462"></a>00462 <a class="code" href="a00722.html" title="dynamic, self-adjusting array of vtkIdType">vtkIdTypeArray</a> *GetPointsInRegion(<span class="keywordtype">int</span> regionId); <a name="l00463"></a>00463 <a name="l00466"></a>00466 <span class="keywordtype">void</span> <a class="code" href="a00971.html#dd4eab3ae37e43fb99d99981e8cfb7d9">FreeSearchStructure</a>(); <a name="l00467"></a>00467 <a name="l00470"></a>00470 <span class="keywordtype">void</span> <a class="code" href="a00971.html#cee465040df484d7fcbd2fdc34e94aae">GenerateRepresentation</a>(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2103f20abad13593a5879a08c3e64355835">level</a>, <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *pd); <a name="l00471"></a>00471 <a name="l00474"></a>00474 <span class="keywordtype">void</span> <a class="code" href="a00971.html#cee465040df484d7fcbd2fdc34e94aae">GenerateRepresentation</a>(<span class="keywordtype">int</span> *regionList, <span class="keywordtype">int</span> len, <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *pd); <a name="l00475"></a>00475 <a name="l00477"></a>00477 <a name="l00481"></a>00481 vtkBooleanMacro(GenerateRepresentationUsingDataBounds, <span class="keywordtype">int</span>); <a name="l00482"></a>00482 vtkSetMacro(GenerateRepresentationUsingDataBounds, <span class="keywordtype">int</span>); <a name="l00483"></a>00483 vtkGetMacro(GenerateRepresentationUsingDataBounds, <span class="keywordtype">int</span>); <a name="l00485"></a>00485 <a name="l00487"></a>00487 <span class="keyword">virtual</span> <span class="keywordtype">void</span> PrintTiming(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00488"></a>00488 <a name="l00491"></a>00491 <span class="keyword">virtual</span> <span class="keywordtype">int</span> NewGeometry(); <a name="l00492"></a>00492 <a name="l00495"></a>00495 <span class="keyword">virtual</span> <span class="keywordtype">int</span> NewGeometry(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> **sets, <span class="keywordtype">int</span> numDataSets); <a name="l00496"></a>00496 <a name="l00500"></a>00500 <span class="keyword">virtual</span> <span class="keywordtype">void</span> InvalidateGeometry(); <a name="l00501"></a>00501 <a name="l00505"></a>00505 <span class="keyword">static</span> <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *CopyTree(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd); <a name="l00506"></a>00506 <a name="l00511"></a>00511 <span class="keywordtype">void</span> FindPointsInArea(<span class="keywordtype">double</span>* area, <a class="code" href="a00722.html" title="dynamic, self-adjusting array of vtkIdType">vtkIdTypeArray</a>* ids, <span class="keywordtype">bool</span> clearArray = <span class="keyword">true</span>); <a name="l00512"></a>00512 <a name="l00513"></a>00513 <span class="keyword">protected</span>: <a name="l00514"></a>00514 <a name="l00515"></a>00515 <a class="code" href="a00933.html" title="a Kd-tree spatial decomposition of a set of points">vtkKdTree</a>(); <a name="l00516"></a>00516 ~<a class="code" href="a00933.html" title="a Kd-tree spatial decomposition of a set of points">vtkKdTree</a>(); <a name="l00517"></a>00517 <a name="l00518"></a><a class="code" href="a00933.html#4a37668060e96b42f16a56b16f0b89eb">00518</a> <a class="code" href="a00218.html" title="Perform calculations (mostly intersection calculations) on regions of a 3D binary...">vtkBSPIntersections</a> *BSPCalculator; <a name="l00519"></a><a class="code" href="a00933.html#b289ffe608f300ca23b6614d5912b1bf">00519</a> <span class="keywordtype">int</span> UserDefinedCuts; <a name="l00520"></a>00520 <a name="l00521"></a>00521 <span class="keywordtype">void</span> SetCalculator(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd); <a name="l00522"></a>00522 <a name="l00523"></a>00523 <span class="keywordtype">int</span> ProcessUserDefinedCuts(<span class="keywordtype">double</span> *bounds); <a name="l00524"></a>00524 <a name="l00525"></a>00525 <span class="keywordtype">void</span> SetCuts(<a class="code" href="a00217.html" title="This class represents an axis-aligned Binary Spatial Partitioning of a 3D space.">vtkBSPCuts</a> *cuts, <span class="keywordtype">int</span> userDefined); <a name="l00526"></a>00526 <a name="l00530"></a>00530 <span class="keywordtype">void</span> UpdateBuildTime(); <a name="l00531"></a>00531 <a name="l00537"></a>00537 <span class="keywordtype">int</span> DivideTest(<span class="keywordtype">int</span> numberOfPoints, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2103f20abad13593a5879a08c3e64355835">level</a>); <a name="l00538"></a>00538 <a name="l00539"></a>00539 <span class="comment">//BTX</span> <a name="l00540"></a>00540 <span class="keyword">enum</span> { <a name="l00541"></a><a class="code" href="a00933.html#518a4edaa258a578fabfa4a1ddbbbc8cff601bd88deb884bd08afebb99f43ad8">00541</a> XDIM = 0, <span class="comment">// don't change these values</span> <a name="l00542"></a><a class="code" href="a00933.html#518a4edaa258a578fabfa4a1ddbbbc8c6a5391f123ba7751b2737b6d504bc3ea">00542</a> YDIM = 1, <a name="l00543"></a><a class="code" href="a00933.html#518a4edaa258a578fabfa4a1ddbbbc8c36aa598e6da9422c599a2b74a2cbabfa">00543</a> ZDIM = 2 <a name="l00544"></a>00544 }; <a name="l00545"></a>00545 <span class="comment">//ETX</span> <a name="l00546"></a>00546 <a name="l00547"></a><a class="code" href="a00933.html#18f792ba2f4d2a91d02e8e676e9fb69d">00547</a> <span class="keywordtype">int</span> ValidDirections; <a name="l00548"></a>00548 <a name="l00549"></a><a class="code" href="a00933.html#fa4d0643fcb398ad85e3a050e5c2a795">00549</a> <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *Top; <a name="l00550"></a><a class="code" href="a00933.html#4cdc7de768bc8b1438db3c7a4c700264">00550</a> <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> **RegionList; <span class="comment">// indexed by region ID</span> <a name="l00551"></a>00551 <a name="l00552"></a><a class="code" href="a00933.html#d287b32f8bc3cbc8bc2b78c83a6b6ba5">00552</a> <a class="code" href="a01715.html" title="Timer support and logging.">vtkTimerLog</a> *TimerLog; <a name="l00553"></a>00553 <a name="l00554"></a>00554 <span class="keyword">static</span> <span class="keywordtype">void</span> DeleteAllDescendants(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *nd); <a name="l00555"></a>00555 <a name="l00556"></a>00556 <span class="keywordtype">void</span> BuildRegionList(); <a name="l00557"></a>00557 <span class="keyword">virtual</span> <span class="keywordtype">int</span> SelectCutDirection(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd); <a name="l00558"></a><a class="code" href="a00933.html#a24ad04a8be95434de58630e33f02954">00558</a> <span class="keywordtype">void</span> SetActualLevel(){this->Level = <a class="code" href="a00933.html#780f3c20e100bf17d1c688e0dfc8bbf1">vtkKdTree::ComputeLevel</a>(this->Top);} <a name="l00559"></a>00559 <a name="l00563"></a>00563 <span class="keywordtype">void</span> GetRegionsAtLevel(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2103f20abad13593a5879a08c3e64355835">level</a>, <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> **nodes); <a name="l00564"></a>00564 <a name="l00568"></a>00568 <span class="keyword">static</span> <span class="keywordtype">void</span> GetLeafNodeIds(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *node, <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *ids); <a name="l00569"></a>00569 <a name="l00570"></a>00570 <a name="l00573"></a>00573 <span class="keywordtype">int</span> GetNumberOfCells(); <a name="l00574"></a>00574 <a name="l00577"></a>00577 <span class="keywordtype">int</span> GetDataSetsNumberOfCells(<span class="keywordtype">int</span> set1, <span class="keywordtype">int</span> set2); <a name="l00578"></a>00578 <a name="l00583"></a>00583 <span class="keywordtype">void</span> ComputeCellCenter(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>, <span class="keywordtype">int</span> cellId, <span class="keywordtype">float</span> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2107cf190fdac7e1fa1890c67ec92d414d6">center</a>); <a name="l00584"></a>00584 <span class="keywordtype">void</span> ComputeCellCenter(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>, <span class="keywordtype">int</span> cellId, <span class="keywordtype">double</span> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2107cf190fdac7e1fa1890c67ec92d414d6">center</a>); <a name="l00585"></a>00585 <a name="l00592"></a>00592 <span class="keywordtype">float</span> *ComputeCellCenters(); <a name="l00593"></a>00593 <span class="keywordtype">float</span> *ComputeCellCenters(<span class="keywordtype">int</span> <span class="keyword">set</span>); <a name="l00594"></a>00594 <span class="keywordtype">float</span> *ComputeCellCenters(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *<span class="keyword">set</span>); <a name="l00595"></a>00595 <a name="l00596"></a><a class="code" href="a00933.html#11fc27d823dea9718083e6815f20785e">00596</a> <a class="code" href="a00378.html" title="maintain an unordered list of dataset objects">vtkDataSetCollection</a> *DataSets; <a name="l00597"></a>00597 <a name="l00598"></a>00598 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00971.html#f322993266049eb5d298df184960641e">ReportReferences</a>(<a class="code" href="a00572.html" title="Detect and break reference loops.">vtkGarbageCollector</a>*); <a name="l00599"></a>00599 <a name="l00602"></a>00602 <span class="keywordtype">void</span> UpdateProgress(<span class="keywordtype">double</span> amount); <a name="l00603"></a>00603 <a name="l00605"></a>00605 <a name="l00606"></a>00606 vtkSetClampMacro(Progress,<span class="keywordtype">double</span>,0.0,1.0); <a name="l00607"></a><a class="code" href="a00933.html#86e0d0399089dab6ca025924070bef23">00607</a> vtkGetMacro(Progress,<span class="keywordtype">double</span>); <a name="l00609"></a>00609 <a name="l00610"></a>00610 <span class="keyword">protected</span>: <a name="l00611"></a>00611 <span class="comment">// So that each suboperation can report progress</span> <a name="l00612"></a>00612 <span class="comment">// in [0,1], yet we will be able to report a global </span> <a name="l00613"></a>00613 <span class="comment">// progress. Sub-operations must use UpdateSubOperationProgress()</span> <a name="l00614"></a>00614 <span class="comment">// for this to work.</span> <a name="l00615"></a>00615 <span class="keywordtype">double</span> ProgressScale; <a name="l00616"></a><a class="code" href="a00933.html#8e6eedb9af90aed8d50fc1cbca6c94f9">00616</a> <span class="keywordtype">double</span> ProgressOffset; <a name="l00617"></a>00617 <a name="l00618"></a>00618 <span class="comment">// Update progress for a sub-operation. \c amount goes from 0.0 to 1.0.</span> <a name="l00619"></a>00619 <span class="comment">// Actual progress is given by </span> <a name="l00620"></a>00620 <span class="comment">// (this->ProgressOffset + this->ProgressScale* amount).</span> <a name="l00621"></a>00621 <span class="keywordtype">void</span> UpdateSubOperationProgress(<span class="keywordtype">double</span> amount); <a name="l00622"></a>00622 <a name="l00623"></a>00623 <span class="keyword">static</span> <span class="keywordtype">void</span> _SetNewBounds(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd, <span class="keywordtype">double</span> *b, <span class="keywordtype">int</span> *fixDim); <a name="l00624"></a>00624 <span class="keyword">static</span> <span class="keywordtype">void</span> CopyChildNodes(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *to, <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *from); <a name="l00625"></a>00625 <span class="keyword">static</span> <span class="keywordtype">void</span> CopyKdNode(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *to, <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *from); <a name="l00626"></a>00626 <span class="keyword">static</span> <span class="keywordtype">void</span> SetDataBoundsToSpatialBounds(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd); <a name="l00627"></a>00627 <span class="keyword">static</span> <span class="keywordtype">void</span> ZeroNumberOfPoints(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd); <a name="l00628"></a>00628 <a name="l00629"></a>00629 <span class="comment">//BTX</span> <a name="l00630"></a>00630 <span class="comment">// Recursive helper for public FindPointsWithinRadius</span> <a name="l00631"></a>00631 <span class="keywordtype">void</span> FindPointsWithinRadius(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a>* node, <span class="keywordtype">double</span> R2, <a name="l00632"></a>00632 <span class="keyword">const</span> <span class="keywordtype">double</span> x[3], <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a>* ids); <a name="l00633"></a>00633 <a name="l00634"></a>00634 <span class="comment">// Recursive helper for public FindPointsWithinRadius</span> <a name="l00635"></a>00635 <span class="keywordtype">void</span> AddAllPointsInRegion(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a>* node, <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a>* ids); <a name="l00636"></a>00636 <a name="l00637"></a>00637 <span class="comment">// Recursive helper for public FindPointsInArea</span> <a name="l00638"></a>00638 <span class="keywordtype">void</span> FindPointsInArea(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a>* node, <span class="keywordtype">double</span>* area, <a class="code" href="a00722.html" title="dynamic, self-adjusting array of vtkIdType">vtkIdTypeArray</a>* ids); <a name="l00639"></a>00639 <a name="l00640"></a>00640 <span class="comment">// Recursive helper for public FindPointsInArea</span> <a name="l00641"></a>00641 <span class="keywordtype">void</span> AddAllPointsInRegion(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a>* node, <a class="code" href="a00722.html" title="dynamic, self-adjusting array of vtkIdType">vtkIdTypeArray</a>* ids); <a name="l00642"></a>00642 <a name="l00643"></a>00643 <span class="keywordtype">int</span> DivideRegion(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd, <span class="keywordtype">float</span> *c1, <span class="keywordtype">int</span> *ids, <span class="keywordtype">int</span> nlevels); <a name="l00644"></a>00644 <a name="l00645"></a>00645 <span class="keywordtype">void</span> DoMedianFind(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd, <span class="keywordtype">float</span> *c1, <span class="keywordtype">int</span> *ids, <span class="keywordtype">int</span> d1, <span class="keywordtype">int</span> d2, <span class="keywordtype">int</span> d3); <a name="l00646"></a>00646 <a name="l00647"></a>00647 <span class="keywordtype">void</span> SelfRegister(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd); <a name="l00648"></a>00648 <a name="l00649"></a><a class="code" href="a00934.html">00649</a> <span class="keyword">struct </span><a class="code" href="a00934.html">_cellList</a>{ <a name="l00650"></a><a class="code" href="a00934.html#6e0f2aca02b6c307a6529e9fd02be937">00650</a> <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *dataSet; <span class="comment">// cell lists for which data set</span> <a name="l00651"></a><a class="code" href="a00934.html#0440985ab33881bb29560cf8a0d7535b">00651</a> <span class="keywordtype">int</span> *regionIds; <span class="comment">// NULL if listing all regions</span> <a name="l00652"></a><a class="code" href="a00934.html#fa08f7d0a906a4c78d98f01f12e3a3c6">00652</a> <span class="keywordtype">int</span> nRegions; <a name="l00653"></a><a class="code" href="a00934.html#337c6eaea84ba86c8a921d12f939ba1f">00653</a> <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> **cells; <a name="l00654"></a><a class="code" href="a00934.html#115d8f825df62506668e1da0d3e6658d">00654</a> <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> **boundaryCells; <a name="l00655"></a><a class="code" href="a00934.html#24a6b235199a70749b0a33be7574e086">00655</a> <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *emptyList; <a name="l00656"></a>00656 }; <a name="l00657"></a>00657 <span class="comment">//ETX</span> <a name="l00658"></a>00658 <a name="l00659"></a>00659 <span class="keywordtype">void</span> InitializeCellLists(); <a name="l00660"></a>00660 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *GetList(<span class="keywordtype">int</span> regionId, <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> **which); <a name="l00661"></a>00661 <a name="l00662"></a>00662 <span class="keywordtype">void</span> ComputeCellCenter(<a class="code" href="a00240.html" title="abstract class to specify cell behavior">vtkCell</a>* cell, <span class="keywordtype">double</span> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2107cf190fdac7e1fa1890c67ec92d414d6">center</a>, <span class="keywordtype">double</span> *weights); <a name="l00663"></a>00663 <a name="l00664"></a>00664 <span class="keywordtype">void</span> GenerateRepresentationDataBounds(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2103f20abad13593a5879a08c3e64355835">level</a>, <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *pd); <a name="l00665"></a>00665 <span class="keywordtype">void</span> _generateRepresentationDataBounds(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd, <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *pts, <a name="l00666"></a>00666 <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *polys, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2103f20abad13593a5879a08c3e64355835">level</a>); <a name="l00667"></a>00667 <a name="l00668"></a>00668 <span class="keywordtype">void</span> GenerateRepresentationWholeSpace(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2103f20abad13593a5879a08c3e64355835">level</a>, <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *pd); <a name="l00669"></a>00669 <span class="keywordtype">void</span> _generateRepresentationWholeSpace(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd, <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *pts, <a name="l00670"></a>00670 <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *polys, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2103f20abad13593a5879a08c3e64355835">level</a>); <a name="l00671"></a>00671 <a name="l00672"></a>00672 <span class="keywordtype">void</span> AddPolys(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd, <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *pts, <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *polys); <a name="l00673"></a>00673 <a name="l00674"></a>00674 <span class="keywordtype">void</span> _printTree(<span class="keywordtype">int</span> verbose); <a name="l00675"></a>00675 <a name="l00676"></a>00676 <span class="keywordtype">int</span> SearchNeighborsForDuplicate(<span class="keywordtype">int</span> regionId, <span class="keywordtype">float</span> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21006fc9b75c5a0835cfad2ef5d44379a0b">point</a>, <a name="l00677"></a>00677 <span class="keywordtype">int</span> **pointsSoFar, <span class="keywordtype">int</span> *len, <a name="l00678"></a>00678 <span class="keywordtype">float</span> tolerance, <span class="keywordtype">float</span> tolerance2); <a name="l00679"></a>00679 <a name="l00680"></a>00680 <span class="keywordtype">int</span> SearchRegionForDuplicate(<span class="keywordtype">float</span> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21006fc9b75c5a0835cfad2ef5d44379a0b">point</a>, <span class="keywordtype">int</span> *pointsSoFar, <a name="l00681"></a>00681 <span class="keywordtype">int</span> len, <span class="keywordtype">float</span> tolerance2); <a name="l00682"></a>00682 <a name="l00683"></a>00683 <span class="keywordtype">int</span> _FindClosestPointInRegion(<span class="keywordtype">int</span> regionId, <a name="l00684"></a>00684 <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z, <span class="keywordtype">double</span> &dist2); <a name="l00685"></a>00685 <a name="l00686"></a>00686 <span class="keywordtype">int</span> FindClosestPointInSphere(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z, <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c88c373494669189048f82ee86af5852">radius</a>, <a name="l00687"></a>00687 <span class="keywordtype">int</span> skipRegion, <span class="keywordtype">double</span> &dist2); <a name="l00688"></a>00688 <a name="l00689"></a>00689 <span class="keywordtype">int</span> _ViewOrderRegionsInDirection(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *IdsOfInterest, <a name="l00690"></a>00690 <span class="keyword">const</span> <span class="keywordtype">double</span> dop[3], <a name="l00691"></a>00691 <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *orderedList); <a name="l00692"></a>00692 <a name="l00693"></a>00693 <span class="keyword">static</span> <span class="keywordtype">int</span> __ViewOrderRegionsInDirection(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *node, <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *list, <a name="l00694"></a>00694 <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *IdsOfInterest, <a name="l00695"></a>00695 <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210652910e0524bce5b8ec2644cad351b81">dir</a>[3], <span class="keywordtype">int</span> nextId); <a name="l00696"></a>00696 <a name="l00697"></a>00697 <span class="keywordtype">int</span> _ViewOrderRegionsFromPosition(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *IdsOfInterest, <a name="l00698"></a>00698 <span class="keyword">const</span> <span class="keywordtype">double</span> pos[3], <a name="l00699"></a>00699 <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *orderedList); <a name="l00700"></a>00700 <a name="l00701"></a>00701 <span class="keyword">static</span> <span class="keywordtype">int</span> __ViewOrderRegionsFromPosition(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *node, <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *list, <a name="l00702"></a>00702 <a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *IdsOfInterest, <a name="l00703"></a>00703 <span class="keyword">const</span> <span class="keywordtype">double</span> pos[3], <span class="keywordtype">int</span> nextId); <a name="l00704"></a>00704 <a name="l00705"></a>00705 <span class="keyword">static</span> <span class="keywordtype">int</span> __ConvexSubRegions(<span class="keywordtype">int</span> *ids, <span class="keywordtype">int</span> len, <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *tree, <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> **nodes); <a name="l00706"></a>00706 <span class="keyword">static</span> <span class="keywordtype">int</span> FoundId(<a class="code" href="a00900.html" title="dynamic, self-adjusting array of int">vtkIntArray</a> *idArray, <span class="keywordtype">int</span> <span class="keywordtype">id</span>); <a name="l00707"></a>00707 <a name="l00708"></a>00708 <span class="keywordtype">void</span> NewParitioningRequest(<span class="keywordtype">int</span> req); <a name="l00709"></a>00709 <span class="keywordtype">void</span> SetInputDataInfo(<span class="keywordtype">int</span> i, <a name="l00710"></a>00710 <span class="keywordtype">int</span> dims[3], <span class="keywordtype">double</span> origin[3], <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210b60285711fa8d2a46166a29951678aa7">spacing</a>[3]); <a name="l00711"></a>00711 <span class="keywordtype">int</span> CheckInputDataInfo(<span class="keywordtype">int</span> i, <a name="l00712"></a>00712 <span class="keywordtype">int</span> dims[3], <span class="keywordtype">double</span> origin[3], <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210b60285711fa8d2a46166a29951678aa7">spacing</a>[3]); <a name="l00713"></a>00713 <span class="keywordtype">void</span> ClearLastBuildCache(); <a name="l00714"></a>00714 <a name="l00715"></a>00715 <span class="comment">//BTX</span> <a name="l00716"></a>00716 <span class="keyword">static</span> <span class="keywordtype">void</span> __printTree(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd, <span class="keywordtype">int</span> depth, <span class="keywordtype">int</span> verbose); <a name="l00717"></a>00717 <span class="comment">//ETX</span> <a name="l00718"></a>00718 <a name="l00719"></a>00719 <span class="keyword">static</span> <span class="keywordtype">int</span> MidValue(<span class="keywordtype">int</span> dim, <span class="keywordtype">float</span> *c1, <span class="keywordtype">int</span> nvals, <span class="keywordtype">double</span> &coord); <a name="l00720"></a>00720 <a name="l00721"></a>00721 <span class="keyword">static</span> <span class="keywordtype">int</span> Select(<span class="keywordtype">int</span> dim, <span class="keywordtype">float</span> *c1, <span class="keywordtype">int</span> *ids, <span class="keywordtype">int</span> nvals, <span class="keywordtype">double</span> &coord); <a name="l00722"></a>00722 <span class="keyword">static</span> <span class="keywordtype">float</span> FindMaxLeftHalf(<span class="keywordtype">int</span> dim, <span class="keywordtype">float</span> *c1, <span class="keywordtype">int</span> K); <a name="l00723"></a>00723 <span class="keyword">static</span> <span class="keywordtype">void</span> _Select(<span class="keywordtype">int</span> dim, <span class="keywordtype">float</span> *X, <span class="keywordtype">int</span> *ids, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> R, <span class="keywordtype">int</span> K); <a name="l00724"></a>00724 <a name="l00725"></a>00725 <span class="comment">//BTX</span> <a name="l00726"></a>00726 <span class="keyword">static</span> <span class="keywordtype">int</span> ComputeLevel(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd); <a name="l00727"></a>00727 <span class="keyword">static</span> <span class="keywordtype">int</span> SelfOrder(<span class="keywordtype">int</span> <span class="keywordtype">id</span>, <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd); <a name="l00728"></a>00728 <span class="keyword">static</span> <span class="keywordtype">int</span> findRegion(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *node, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z); <a name="l00729"></a>00729 <span class="keyword">static</span> <span class="keywordtype">int</span> findRegion(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *node, <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z); <a name="l00730"></a>00730 <span class="comment">//ETX</span> <a name="l00731"></a>00731 <a name="l00732"></a>00732 <span class="keyword">static</span> <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> **_GetRegionsAtLevel(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2103f20abad13593a5879a08c3e64355835">level</a>, <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> **nodes, <a name="l00733"></a>00733 <a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd); <a name="l00734"></a>00734 <a name="l00735"></a>00735 <span class="keyword">static</span> <span class="keywordtype">void</span> AddNewRegions(<a class="code" href="a00932.html" title="This class represents a single spatial region in an 3D axis aligned binary spatial...">vtkKdNode</a> *kd, <span class="keywordtype">float</span> *c1, <a name="l00736"></a>00736 <span class="keywordtype">int</span> midpt, <span class="keywordtype">int</span> dim, <span class="keywordtype">double</span> coord); <a name="l00737"></a>00737 <a name="l00738"></a>00738 <span class="keywordtype">void</span> NewPartitioningRequest(<span class="keywordtype">int</span> req); <a name="l00739"></a>00739 <a name="l00740"></a><a class="code" href="a00933.html#39e966bda7b2b523e032ba874dd16fa8">00740</a> <span class="keywordtype">int</span> NumberOfRegionsOrLess; <a name="l00741"></a><a class="code" href="a00933.html#7f0f1c7445fb90790817dd87acbca9ee">00741</a> <span class="keywordtype">int</span> NumberOfRegionsOrMore; <a name="l00742"></a>00742 <a name="l00743"></a><a class="code" href="a00933.html#bfaf8e0d89c71087ad7203960ef93cae">00743</a> <span class="keywordtype">int</span> IncludeRegionBoundaryCells; <a name="l00744"></a><a class="code" href="a00933.html#5dd869a7eab9b8a90f29116d79db1eeb">00744</a> <span class="keywordtype">double</span> CellBoundsCache[6]; <span class="comment">// to optimize IntersectsCell()</span> <a name="l00745"></a>00745 <a name="l00746"></a><a class="code" href="a00933.html#b6a54005a39da7bfa350e32169bafbfd">00746</a> <span class="keywordtype">int</span> GenerateRepresentationUsingDataBounds; <a name="l00747"></a>00747 <a name="l00748"></a>00748 <span class="comment">//BTX</span> <a name="l00749"></a><a class="code" href="a00933.html#a4937008f7871d3325e3db953d4f9131">00749</a> <span class="keyword">struct </span><a class="code" href="a00934.html">_cellList</a> CellList; <a name="l00750"></a>00750 <span class="comment">//ETX</span> <a name="l00751"></a>00751 <a name="l00752"></a>00752 <span class="comment">// Region Ids, by data set by cell id - this list is large (one</span> <a name="l00753"></a>00753 <span class="comment">// int per cell) but accelerates creation of cell lists</span> <a name="l00754"></a>00754 <a name="l00755"></a><a class="code" href="a00933.html#deb5719569b61a83305723b14f781718">00755</a> <span class="keywordtype">int</span> *CellRegionList; <a name="l00756"></a>00756 <a name="l00757"></a><a class="code" href="a00933.html#b7c3b646debb98cad867a0391d281774">00757</a> <span class="keywordtype">int</span> MinCells; <a name="l00758"></a><a class="code" href="a00933.html#1bd7ecbf05a7300588139205199ee1ff">00758</a> <span class="keywordtype">int</span> NumberOfRegions; <span class="comment">// number of leaf nodes</span> <a name="l00759"></a>00759 <a name="l00760"></a><a class="code" href="a00933.html#b7c5ff56c9df34ad392cf5fb287488c8">00760</a> <span class="keywordtype">int</span> Timing; <a name="l00761"></a><a class="code" href="a00933.html#bd3bc29aec9900a66a99ffdab9cd866e">00761</a> <span class="keywordtype">double</span> FudgeFactor; <span class="comment">// a very small distance, relative to the dataset's size</span> <a name="l00762"></a>00762 <a name="l00763"></a>00763 <span class="comment">// These instance variables are used by the special locator created</span> <a name="l00764"></a>00764 <span class="comment">// to find duplicate points. (BuildLocatorFromPoints)</span> <a name="l00765"></a>00765 <a name="l00766"></a><a class="code" href="a00933.html#6b2e77d4a0cf0e733aa0e5ad80e89b2e">00766</a> <span class="keywordtype">int</span> NumberOfLocatorPoints; <a name="l00767"></a><a class="code" href="a00933.html#ff16f99820621b6c141ebbdcd9f47fd1">00767</a> <span class="keywordtype">float</span> *LocatorPoints; <a name="l00768"></a><a class="code" href="a00933.html#8a6abb2cac4672ff826c09123d21208b">00768</a> <span class="keywordtype">int</span> *LocatorIds; <a name="l00769"></a><a class="code" href="a00933.html#515a8d385cff3156d32e34aea1fae095">00769</a> <span class="keywordtype">int</span> *LocatorRegionLocation; <a name="l00770"></a>00770 <a name="l00771"></a><a class="code" href="a00933.html#25296953dc73e3bc1fb7d6898432a83f">00771</a> <span class="keywordtype">float</span> MaxWidth; <a name="l00772"></a>00772 <a name="l00773"></a>00773 <span class="comment">// These Last* values are here to save state so we can</span> <a name="l00774"></a>00774 <span class="comment">// determine later if k-d tree must be rebuilt.</span> <a name="l00775"></a>00775 <a name="l00776"></a><a class="code" href="a00933.html#4fb070f3c021f2870b1adaef3c480814">00776</a> <span class="keywordtype">int</span> LastNumDataSets; <a name="l00777"></a><a class="code" href="a00933.html#23ff2b58d59719c9486f4354e9a613f7">00777</a> <span class="keywordtype">int</span> LastDataCacheSize; <a name="l00778"></a><a class="code" href="a00933.html#4471d15d1ed760a0c8d1168bfe86e075">00778</a> <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> **LastInputDataSets; <a name="l00779"></a><a class="code" href="a00933.html#d8d3b73018fcd4094043ccdb6b8a044c">00779</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *LastDataSetObserverTags; <a name="l00780"></a><a class="code" href="a00933.html#0a0868cf79889b1b4d7fb6912e8c7ef5">00780</a> <span class="keywordtype">int</span> *LastDataSetType; <a name="l00781"></a><a class="code" href="a00933.html#46b4c1bc73ac5236b65f65a2fc953ef5">00781</a> <span class="keywordtype">double</span> *LastInputDataInfo; <a name="l00782"></a><a class="code" href="a00933.html#72d0c9347693d7e16971489eb2fce6f9">00782</a> <span class="keywordtype">double</span> *LastBounds; <a name="l00783"></a><a class="code" href="a00933.html#65410ff3a994a595a6ad29b47a4b3364">00783</a> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> *LastNumPoints; <a name="l00784"></a><a class="code" href="a00933.html#f1f79ec86aaf775900ff36b14483e6cf">00784</a> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> *LastNumCells; <a name="l00785"></a>00785 <a name="l00786"></a><a class="code" href="a00933.html#4a07f32804cca2586bba3db2ddc5d575">00786</a> <a class="code" href="a00217.html" title="This class represents an axis-aligned Binary Spatial Partitioning of a 3D space.">vtkBSPCuts</a> *Cuts; <a name="l00787"></a><a class="code" href="a00933.html#af250d048dcb9cdd48f09a1d2bc2aec0">00787</a> <span class="keywordtype">double</span> Progress; <a name="l00788"></a>00788 <a name="l00789"></a>00789 <a class="code" href="a00933.html" title="a Kd-tree spatial decomposition of a set of points">vtkKdTree</a>(<span class="keyword">const</span> <a class="code" href="a00933.html" title="a Kd-tree spatial decomposition of a set of points">vtkKdTree</a>&); <span class="comment">// Not implemented</span> <a name="l00790"></a>00790 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00933.html" title="a Kd-tree spatial decomposition of a set of points">vtkKdTree</a>&); <span class="comment">// Not implemented</span> <a name="l00791"></a>00791 }; <a name="l00792"></a>00792 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:16 2009 for VTK by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>