<!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/Graphics/vtkPolyDataNormals.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/Graphics/vtkPolyDataNormals.h</h1><a href="a02617.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: vtkPolyDataNormals.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="l00041"></a>00041 <span class="preprocessor">#ifndef __vtkPolyDataNormals_h</span> <a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define __vtkPolyDataNormals_h</span> <a name="l00043"></a>00043 <span class="preprocessor"></span> <a name="l00044"></a>00044 <span class="preprocessor">#include "<a class="code" href="a02331.html">vtkPolyDataAlgorithm.h</a>"</span> <a name="l00045"></a>00045 <a name="l00046"></a>00046 <span class="keyword">class </span><a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a>; <a name="l00047"></a>00047 <span class="keyword">class </span><a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a>; <a name="l00048"></a>00048 <span class="keyword">class </span><a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a>; <a name="l00049"></a>00049 <a name="l00050"></a><a class="code" href="a01267.html">00050</a> <span class="keyword">class </span><a class="code" href="a02170.html#c3c1ffe2fe47b9b70ba90182b7860cce">VTK_GRAPHICS_EXPORT</a> <a class="code" href="a01267.html" title="compute normals for polygonal mesh">vtkPolyDataNormals</a> : <span class="keyword">public</span> <a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a> <a name="l00051"></a>00051 { <a name="l00052"></a>00052 <span class="keyword">public</span>: <a name="l00053"></a><a class="code" href="a01267.html#1ebaff3d06693d98ccf014d7b2c0e304">00053</a> vtkTypeRevisionMacro(<a class="code" href="a01267.html" title="compute normals for polygonal mesh">vtkPolyDataNormals</a>,<a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a>); <a name="l00054"></a>00054 <span class="keywordtype">void</span> <a class="code" href="a01261.html#e6d59a63261b0c56f8f473984ae0e1b6">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00055"></a>00055 <a name="l00059"></a>00059 <span class="keyword">static</span> <a class="code" href="a01267.html" title="compute normals for polygonal mesh">vtkPolyDataNormals</a> *<a class="code" href="a01261.html#cf785ac526132296ff652c636f713b5e">New</a>(); <a name="l00060"></a>00060 <a name="l00062"></a>00062 <a name="l00065"></a>00065 vtkSetClampMacro(FeatureAngle,<span class="keywordtype">double</span>,0.0,180.0); <a name="l00066"></a>00066 vtkGetMacro(FeatureAngle,<span class="keywordtype">double</span>); <a name="l00068"></a>00068 <a name="l00070"></a>00070 <a name="l00071"></a>00071 vtkSetMacro(Splitting,<span class="keywordtype">int</span>); <a name="l00072"></a>00072 vtkGetMacro(Splitting,<span class="keywordtype">int</span>); <a name="l00073"></a>00073 vtkBooleanMacro(Splitting,<span class="keywordtype">int</span>); <a name="l00075"></a>00075 <a name="l00077"></a>00077 <a name="l00078"></a>00078 vtkSetMacro(Consistency,<span class="keywordtype">int</span>); <a name="l00079"></a>00079 vtkGetMacro(Consistency,<span class="keywordtype">int</span>); <a name="l00080"></a>00080 vtkBooleanMacro(Consistency,<span class="keywordtype">int</span>); <a name="l00082"></a>00082 <a name="l00084"></a>00084 <a name="l00092"></a>00092 vtkSetMacro(AutoOrientNormals, <span class="keywordtype">int</span>); <a name="l00093"></a>00093 vtkGetMacro(AutoOrientNormals, <span class="keywordtype">int</span>); <a name="l00094"></a>00094 vtkBooleanMacro(AutoOrientNormals, <span class="keywordtype">int</span>); <a name="l00096"></a>00096 <a name="l00098"></a>00098 <a name="l00099"></a>00099 vtkSetMacro(ComputePointNormals,<span class="keywordtype">int</span>); <a name="l00100"></a>00100 vtkGetMacro(ComputePointNormals,<span class="keywordtype">int</span>); <a name="l00101"></a>00101 vtkBooleanMacro(ComputePointNormals,<span class="keywordtype">int</span>); <a name="l00103"></a>00103 <a name="l00105"></a>00105 <a name="l00106"></a>00106 vtkSetMacro(ComputeCellNormals,<span class="keywordtype">int</span>); <a name="l00107"></a>00107 vtkGetMacro(ComputeCellNormals,<span class="keywordtype">int</span>); <a name="l00108"></a>00108 vtkBooleanMacro(ComputeCellNormals,<span class="keywordtype">int</span>); <a name="l00110"></a>00110 <a name="l00112"></a>00112 <a name="l00116"></a>00116 vtkSetMacro(FlipNormals,<span class="keywordtype">int</span>); <a name="l00117"></a>00117 vtkGetMacro(FlipNormals,<span class="keywordtype">int</span>); <a name="l00118"></a>00118 vtkBooleanMacro(FlipNormals,<span class="keywordtype">int</span>); <a name="l00120"></a>00120 <a name="l00122"></a>00122 <a name="l00125"></a>00125 vtkSetMacro(NonManifoldTraversal,<span class="keywordtype">int</span>); <a name="l00126"></a>00126 vtkGetMacro(NonManifoldTraversal,<span class="keywordtype">int</span>); <a name="l00127"></a>00127 vtkBooleanMacro(NonManifoldTraversal,<span class="keywordtype">int</span>); <a name="l00129"></a>00129 <a name="l00130"></a>00130 <span class="keyword">protected</span>: <a name="l00131"></a>00131 <a class="code" href="a01267.html" title="compute normals for polygonal mesh">vtkPolyDataNormals</a>(); <a name="l00132"></a><a class="code" href="a01267.html#8a6a353657dd3f82476a3f4dbc26e6a6">00132</a> ~<a class="code" href="a01267.html" title="compute normals for polygonal mesh">vtkPolyDataNormals</a>() {}; <a name="l00133"></a>00133 <a name="l00134"></a>00134 <span class="comment">// Usual data generation method</span> <a name="l00135"></a>00135 <span class="keywordtype">int</span> <a class="code" href="a01261.html#6b5a43ab1f9bbcb368c7dc83e4afe068">RequestData</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a> *, <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> **, <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *); <a name="l00136"></a>00136 <a name="l00137"></a><a class="code" href="a01267.html#8251607e799957e1e573abf580a65c67">00137</a> <span class="keywordtype">double</span> FeatureAngle; <a name="l00138"></a><a class="code" href="a01267.html#662f0c8107a338725776bcf69be7801d">00138</a> <span class="keywordtype">int</span> Splitting; <a name="l00139"></a><a class="code" href="a01267.html#034b8d79ae5b91d3b7bf160d479058f2">00139</a> <span class="keywordtype">int</span> Consistency; <a name="l00140"></a><a class="code" href="a01267.html#2454de571bd6a34ec179d3117021d493">00140</a> <span class="keywordtype">int</span> FlipNormals; <a name="l00141"></a><a class="code" href="a01267.html#44684c76795195c86cd521cfbfc56360">00141</a> <span class="keywordtype">int</span> AutoOrientNormals; <a name="l00142"></a><a class="code" href="a01267.html#c12fde55cadf24f1f30513512479eceb">00142</a> <span class="keywordtype">int</span> NonManifoldTraversal; <a name="l00143"></a><a class="code" href="a01267.html#bb851625df8b68ade4b99904be5b125b">00143</a> <span class="keywordtype">int</span> ComputePointNormals; <a name="l00144"></a><a class="code" href="a01267.html#b7186d1f63c6014967ec9660b23c201c">00144</a> <span class="keywordtype">int</span> ComputeCellNormals; <a name="l00145"></a><a class="code" href="a01267.html#4068e0576ff4b674e12c2471110f0c79">00145</a> <span class="keywordtype">int</span> NumFlips; <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="keyword">private</span>: <a name="l00148"></a>00148 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *Wave; <a name="l00149"></a>00149 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *Wave2; <a name="l00150"></a>00150 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *CellIds; <a name="l00151"></a>00151 <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *Map; <a name="l00152"></a>00152 <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *OldMesh; <a name="l00153"></a>00153 <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *NewMesh; <a name="l00154"></a>00154 <span class="keywordtype">int</span> *Visited; <a name="l00155"></a>00155 <a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a> *PolyNormals; <a name="l00156"></a>00156 <span class="keywordtype">double</span> CosAngle; <a name="l00157"></a>00157 <a name="l00158"></a>00158 <span class="comment">// Uses the list of cell ids (this->Wave) to propagate a wave of</span> <a name="l00159"></a>00159 <span class="comment">// checked and properly ordered polygons.</span> <a name="l00160"></a>00160 <span class="keywordtype">void</span> TraverseAndOrder(<span class="keywordtype">void</span>); <a name="l00161"></a>00161 <a name="l00162"></a>00162 <span class="comment">// Check the point id give to see whether it lies on a feature</span> <a name="l00163"></a>00163 <span class="comment">// edge. If so, split the point (i.e., duplicate it) to topologically</span> <a name="l00164"></a>00164 <span class="comment">// separate the mesh.</span> <a name="l00165"></a>00165 <span class="keywordtype">void</span> MarkAndSplit(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> ptId); <a name="l00166"></a>00166 <a name="l00167"></a>00167 <span class="keyword">private</span>: <a name="l00168"></a>00168 <a class="code" href="a01267.html" title="compute normals for polygonal mesh">vtkPolyDataNormals</a>(<span class="keyword">const</span> <a class="code" href="a01267.html" title="compute normals for polygonal mesh">vtkPolyDataNormals</a>&); <span class="comment">// Not implemented.</span> <a name="l00169"></a>00169 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01267.html" title="compute normals for polygonal mesh">vtkPolyDataNormals</a>&); <span class="comment">// Not implemented.</span> <a name="l00170"></a>00170 }; <a name="l00171"></a>00171 <a name="l00172"></a>00172 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:28 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>