<!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/vtkOrderedTriangulator.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/vtkOrderedTriangulator.h</h1><a href="a02312.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: vtkOrderedTriangulator.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="l00087"></a>00087 <span class="preprocessor">#ifndef __vtkOrderedTriangulator_h</span> <a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#define __vtkOrderedTriangulator_h</span> <a name="l00089"></a>00089 <span class="preprocessor"></span> <a name="l00090"></a>00090 <span class="preprocessor">#include "<a class="code" href="a02079.html">vtkObject.h</a>"</span> <a name="l00091"></a>00091 <a name="l00092"></a>00092 <span class="keyword">class </span><a class="code" href="a01789.html" title="dataset represents arbitrary combinations of all possible cell types">vtkUnstructuredGrid</a>; <a name="l00093"></a>00093 <span class="keyword">class </span><a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a>; <a name="l00094"></a>00094 <span class="keyword">class </span><a class="code" href="a00683.html" title="replacement for malloc/free and new/delete">vtkHeap</a>; <a name="l00095"></a>00095 <span class="keyword">class </span><a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a>; <a name="l00096"></a>00096 <span class="keyword">class </span><a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>; <a name="l00097"></a>00097 <span class="keyword">class </span><a class="code" href="a01688.html" title="a 3D cell that represents a tetrahedron">vtkTetra</a>; <a name="l00098"></a>00098 <span class="keyword">class </span><a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a>; <a name="l00099"></a>00099 <span class="keyword">class </span><a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a>; <a name="l00100"></a>00100 <span class="keyword">struct </span>vtkOTMesh; <a name="l00101"></a>00101 <span class="keyword">struct </span>vtkOTTemplates; <a name="l00102"></a>00102 <span class="keyword">class </span><a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a>; <a name="l00103"></a>00103 <span class="keyword">class </span><a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a>; <a name="l00104"></a>00104 <span class="keyword">class </span><a class="code" href="a00245.html" title="represent and manipulate cell attribute data">vtkCellData</a>; <a name="l00105"></a>00105 <a name="l00106"></a>00106 <span class="comment">// Template ID's must be 32-bits. See .cxx file for more information.</span> <a name="l00107"></a>00107 <span class="preprocessor">#if VTK_SIZEOF_SHORT == 4</span> <a name="l00108"></a>00108 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> TemplateIDType; <a name="l00109"></a>00109 <span class="preprocessor">#elif VTK_SIZEOF_INT == 4</span> <a name="l00110"></a>00110 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> TemplateIDType; <a name="l00111"></a>00111 <span class="preprocessor">#elif VTK_SIZEOF_LONG == 4</span> <a name="l00112"></a>00112 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> TemplateIDType; <a name="l00113"></a>00113 <span class="preprocessor">#endif </span> <a name="l00114"></a>00114 <span class="preprocessor"></span> <a name="l00115"></a><a class="code" href="a01128.html">00115</a> <span class="keyword">class </span><a class="code" href="a02170.html#95ced7977a6b6b1bf9f38bf04e3835b6">VTK_FILTERING_EXPORT</a> <a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a> : <span class="keyword">public</span> <a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a> <a name="l00116"></a>00116 { <a name="l00117"></a>00117 <span class="keyword">public</span>: <a name="l00118"></a><a class="code" href="a01128.html#1563ceb33e5be35f356fc97dc73da7f7">00118</a> vtkTypeRevisionMacro(<a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a>,<a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a>); <a name="l00119"></a>00119 <span class="keywordtype">void</span> <a class="code" href="a01084.html#bf3dbb4154289b56a12483eee3866263">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00120"></a>00120 <a name="l00122"></a>00122 <span class="keyword">static</span> <a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>(); <a name="l00123"></a>00123 <a name="l00125"></a>00125 <a name="l00131"></a>00131 <span class="keywordtype">void</span> InitTriangulation(<span class="keywordtype">double</span> xmin, <span class="keywordtype">double</span> xmax, <span class="keywordtype">double</span> ymin, <span class="keywordtype">double</span> ymax, <a name="l00132"></a>00132 <span class="keywordtype">double</span> zmin, <span class="keywordtype">double</span> zmax, <span class="keywordtype">int</span> numPts); <a name="l00133"></a>00133 <span class="keywordtype">void</span> InitTriangulation(<span class="keywordtype">double</span> bounds[6], <span class="keywordtype">int</span> numPts); <a name="l00135"></a>00135 <a name="l00137"></a>00137 <a name="l00150"></a>00150 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> InsertPoint(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <span class="keywordtype">id</span>, <span class="keywordtype">double</span> x[3], <span class="keywordtype">double</span> p[3], <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2108e7f81709ed57920a45c02a954726847">type</a>); <a name="l00151"></a>00151 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> InsertPoint(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <span class="keywordtype">id</span>, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> sortid, <span class="keywordtype">double</span> x[3], <a name="l00152"></a>00152 <span class="keywordtype">double</span> p[3], <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2108e7f81709ed57920a45c02a954726847">type</a>); <a name="l00153"></a>00153 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> InsertPoint(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <span class="keywordtype">id</span>, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> sortid, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> sortid2, <a name="l00154"></a>00154 <span class="keywordtype">double</span> x[3], <span class="keywordtype">double</span> p[3], <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2108e7f81709ed57920a45c02a954726847">type</a>); <a name="l00156"></a>00156 <a name="l00158"></a>00158 <a name="l00161"></a>00161 <span class="keywordtype">void</span> Triangulate(); <a name="l00162"></a>00162 <span class="keywordtype">void</span> TemplateTriangulate(<span class="keywordtype">int</span> cellType, <span class="keywordtype">int</span> numPts, <span class="keywordtype">int</span> numEdges); <a name="l00164"></a>00164 <a name="l00171"></a>00171 <span class="keywordtype">void</span> UpdatePointType(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> internalId, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2108e7f81709ed57920a45c02a954726847">type</a>); <a name="l00172"></a>00172 <a name="l00177"></a>00177 <span class="keywordtype">double</span> *GetPointPosition(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> internalId); <a name="l00178"></a>00178 <a name="l00183"></a>00183 <span class="keywordtype">double</span> *GetPointLocation(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> internalId); <a name="l00184"></a>00184 <a name="l00190"></a>00190 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> GetPointId(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> internalId); <a name="l00191"></a>00191 <a name="l00193"></a>00193 <a name="l00194"></a>00194 vtkGetMacro(NumberOfPoints,<span class="keywordtype">int</span>); <a name="l00196"></a>00196 <a name="l00198"></a>00198 <a name="l00203"></a>00203 vtkSetMacro(UseTemplates,<span class="keywordtype">int</span>); <a name="l00204"></a>00204 vtkGetMacro(UseTemplates,<span class="keywordtype">int</span>); <a name="l00205"></a>00205 vtkBooleanMacro(UseTemplates,<span class="keywordtype">int</span>); <a name="l00207"></a>00207 <a name="l00209"></a>00209 <a name="l00213"></a>00213 vtkSetMacro(PreSorted,<span class="keywordtype">int</span>); <a name="l00214"></a>00214 vtkGetMacro(PreSorted,<span class="keywordtype">int</span>); <a name="l00215"></a>00215 vtkBooleanMacro(PreSorted,<span class="keywordtype">int</span>); <a name="l00217"></a>00217 <a name="l00219"></a>00219 <a name="l00221"></a>00221 vtkSetMacro(UseTwoSortIds,<span class="keywordtype">int</span>); <a name="l00222"></a>00222 vtkGetMacro(UseTwoSortIds,<span class="keywordtype">int</span>); <a name="l00223"></a>00223 vtkBooleanMacro(UseTwoSortIds,<span class="keywordtype">int</span>); <a name="l00225"></a>00225 <a name="l00235"></a>00235 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> GetTetras(<span class="keywordtype">int</span> classification, <a class="code" href="a01789.html" title="dataset represents arbitrary combinations of all possible cell types">vtkUnstructuredGrid</a> *ugrid); <a name="l00236"></a>00236 <a name="l00244"></a>00244 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> AddTetras(<span class="keywordtype">int</span> classification, <a class="code" href="a01789.html" title="dataset represents arbitrary combinations of all possible cell types">vtkUnstructuredGrid</a> *ugrid); <a name="l00245"></a>00245 <a name="l00251"></a>00251 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> AddTetras(<span class="keywordtype">int</span> classification, <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *connectivity); <a name="l00252"></a>00252 <a name="l00254"></a>00254 <a name="l00260"></a>00260 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> AddTetras(<span class="keywordtype">int</span> classification, <a name="l00261"></a>00261 <a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a> *locator, <a name="l00262"></a>00262 <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *outConnectivity, <a name="l00263"></a>00263 <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *inPD, <a name="l00264"></a>00264 <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *outPD, <a name="l00265"></a>00265 <a class="code" href="a00245.html" title="represent and manipulate cell attribute data">vtkCellData</a> *inCD, <a name="l00266"></a>00266 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> cellId, <a name="l00267"></a>00267 <a class="code" href="a00245.html" title="represent and manipulate cell attribute data">vtkCellData</a> *outCD); <a name="l00269"></a>00269 <a name="l00273"></a>00273 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> AddTetras(<span class="keywordtype">int</span> classification, <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *ptIds, <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *pts); <a name="l00274"></a>00274 <a name="l00277"></a>00277 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> AddTriangles(<a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *connectivity); <a name="l00278"></a>00278 <a name="l00282"></a>00282 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> AddTriangles(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <span class="keywordtype">id</span>, <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *connectivity); <a name="l00283"></a>00283 <a name="l00286"></a>00286 <span class="keywordtype">void</span> InitTetraTraversal(); <a name="l00287"></a>00287 <a name="l00289"></a>00289 <a name="l00297"></a>00297 <span class="keywordtype">int</span> GetNextTetra(<span class="keywordtype">int</span> classification, <a class="code" href="a01688.html" title="a 3D cell that represents a tetrahedron">vtkTetra</a> *tet, <a name="l00298"></a>00298 <a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a> *cellScalars, <a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a> *tetScalars); <a name="l00300"></a>00300 <a name="l00301"></a>00301 <span class="keyword">protected</span>: <a name="l00302"></a>00302 <a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a>(); <a name="l00303"></a>00303 ~<a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a>(); <a name="l00304"></a>00304 <a name="l00305"></a>00305 <span class="keyword">private</span>: <a name="l00306"></a>00306 <span class="keywordtype">void</span> Initialize(); <a name="l00307"></a>00307 <a name="l00308"></a>00308 vtkOTMesh *Mesh; <a name="l00309"></a>00309 <span class="keywordtype">int</span> NumberOfPoints; <span class="comment">//number of points inserted</span> <a name="l00310"></a>00310 <span class="keywordtype">int</span> MaximumNumberOfPoints; <span class="comment">//maximum possible number of points to be inserted</span> <a name="l00311"></a>00311 <span class="keywordtype">double</span> Bounds[6]; <a name="l00312"></a>00312 <span class="keywordtype">int</span> PreSorted; <a name="l00313"></a>00313 <span class="keywordtype">int</span> UseTwoSortIds; <a name="l00314"></a>00314 <a class="code" href="a00683.html" title="replacement for malloc/free and new/delete">vtkHeap</a> *Heap; <a name="l00315"></a>00315 <span class="keywordtype">double</span> Quanta; <a name="l00316"></a>00316 <a name="l00317"></a>00317 <span class="keywordtype">int</span> UseTemplates; <a name="l00318"></a>00318 <span class="keywordtype">int</span> CellType; <a name="l00319"></a>00319 <span class="keywordtype">int</span> NumberOfCellPoints; <a name="l00320"></a>00320 <span class="keywordtype">int</span> NumberOfCellEdges; <a name="l00321"></a>00321 <a class="code" href="a00683.html" title="replacement for malloc/free and new/delete">vtkHeap</a> *TemplateHeap; <a name="l00322"></a>00322 vtkOTTemplates *Templates; <a name="l00323"></a>00323 <span class="keywordtype">int</span> TemplateTriangulation(); <a name="l00324"></a>00324 <span class="keywordtype">void</span> AddTemplate(); <a name="l00325"></a>00325 TemplateIDType ComputeTemplateIndex(); <a name="l00326"></a>00326 <a name="l00327"></a>00327 <span class="keyword">private</span>: <a name="l00328"></a>00328 <a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a>(<span class="keyword">const</span> <a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a>&); <span class="comment">// Not implemented.</span> <a name="l00329"></a>00329 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a>&); <span class="comment">// Not implemented.</span> <a name="l00330"></a>00330 }; <a name="l00331"></a>00331 <a name="l00332"></a>00332 <span class="preprocessor">#endif</span> <a name="l00333"></a>00333 <span class="preprocessor"></span> <a name="l00334"></a>00334 </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>