Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 4813

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!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/Infovis/vtkFast2DLayoutStrategy.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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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/Infovis/vtkFast2DLayoutStrategy.h</h1><a href="a03021.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: vtkFast2DLayoutStrategy.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 2008 Sandia Corporation.</span>
<a name="l00017"></a>00017 <span class="comment">  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,</span>
<a name="l00018"></a>00018 <span class="comment">  the U.S. Government retains certain rights in this software.</span>
<a name="l00019"></a>00019 <span class="comment">-------------------------------------------------------------------------*/</span>
<a name="l00038"></a>00038 <span class="preprocessor">#ifndef __vtkFast2DLayoutStrategy_h</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define __vtkFast2DLayoutStrategy_h</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041 <span class="preprocessor">#include "<a class="code" href="a03027.html">vtkGraphLayoutStrategy.h</a>"</span>
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="preprocessor">#include "<a class="code" href="a02127.html">vtkSmartPointer.h</a>"</span>    <span class="comment">// Required for smart pointer internal ivars.</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="keyword">class </span><a class="code" href="a00535.html" title="A splatter optimized for splatting single kernels.">vtkFastSplatter</a>;
<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="a00672.html" title="convert a vtkGraph to vtkPolyData">vtkGraphToPolyData</a>;
<a name="l00048"></a>00048 <span class="keyword">class </span><a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a>;
<a name="l00049"></a>00049 
<a name="l00050"></a><a class="code" href="a00532.html">00050</a> <span class="keyword">class </span><a class="code" href="a02170.html#73f1c245b8811be3c4b76b0a89784e70">VTK_INFOVIS_EXPORT</a> <a class="code" href="a00532.html" title="a simple fast 2D graph layout">vtkFast2DLayoutStrategy</a> : <span class="keyword">public</span> <a class="code" href="a00667.html" title="abstract superclass for all graph layout strategies">vtkGraphLayoutStrategy</a> 
<a name="l00051"></a>00051 {
<a name="l00052"></a>00052 <span class="keyword">public</span>:
<a name="l00053"></a>00053   <span class="keyword">static</span> <a class="code" href="a00532.html" title="a simple fast 2D graph layout">vtkFast2DLayoutStrategy</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>();
<a name="l00054"></a>00054 
<a name="l00055"></a><a class="code" href="a00532.html#2399eec984c4e68826b1f15a072ddc32">00055</a>   vtkTypeRevisionMacro(<a class="code" href="a00532.html" title="a simple fast 2D graph layout">vtkFast2DLayoutStrategy</a>, <a class="code" href="a00667.html" title="abstract superclass for all graph layout strategies">vtkGraphLayoutStrategy</a>);
<a name="l00056"></a>00056   <span class="keywordtype">void</span> <a class="code" href="a00667.html#920e5873c1be5fe0b75c11beca20ed4b">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00057"></a>00057 
<a name="l00059"></a>00059 
<a name="l00062"></a>00062   vtkSetClampMacro(RandomSeed, <span class="keywordtype">int</span>, 0, <a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>);
<a name="l00063"></a>00063   vtkGetMacro(RandomSeed, <span class="keywordtype">int</span>);
<a name="l00065"></a>00065 
<a name="l00067"></a>00067 
<a name="l00072"></a>00072   vtkSetClampMacro(MaxNumberOfIterations, <span class="keywordtype">int</span>, 0, <a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>);
<a name="l00073"></a>00073   vtkGetMacro(MaxNumberOfIterations, <span class="keywordtype">int</span>);
<a name="l00075"></a>00075   
<a name="l00077"></a>00077 
<a name="l00081"></a>00081   vtkSetClampMacro(IterationsPerLayout, <span class="keywordtype">int</span>, 0, <a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>);
<a name="l00082"></a>00082   vtkGetMacro(IterationsPerLayout, <span class="keywordtype">int</span>);
<a name="l00084"></a>00084 
<a name="l00086"></a>00086 
<a name="l00089"></a>00089   vtkSetClampMacro(InitialTemperature, <span class="keywordtype">float</span>, 0.0, <a class="code" href="a02149.html#f90f70cb5ac68abc5389df442fb18b0b">VTK_FLOAT_MAX</a>);
<a name="l00090"></a>00090   vtkGetMacro(InitialTemperature, <span class="keywordtype">float</span>);
<a name="l00092"></a>00092   
<a name="l00094"></a>00094 
<a name="l00098"></a>00098   vtkSetClampMacro(CoolDownRate, <span class="keywordtype">double</span>, 0.01, <a class="code" href="a02149.html#a933eb1ff8ef089de59cce7b41e21261">VTK_DOUBLE_MAX</a>);
<a name="l00099"></a>00099   vtkGetMacro(CoolDownRate, <span class="keywordtype">double</span>);
<a name="l00101"></a>00101   
<a name="l00103"></a>00103 
<a name="l00105"></a>00105   vtkSetMacro(RestDistance, <span class="keywordtype">float</span>);
<a name="l00106"></a>00106   vtkGetMacro(RestDistance, <span class="keywordtype">float</span>);
<a name="l00108"></a>00108   
<a name="l00111"></a>00111   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00667.html#9995da8160277734ae47752207211853">Initialize</a>();
<a name="l00112"></a>00112   
<a name="l00117"></a>00117   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00667.html#14f90ab69c42daa54714afdf45fe0148">Layout</a>();
<a name="l00118"></a>00118   
<a name="l00121"></a><a class="code" href="a00532.html#106d0ac48f5cbe7e8d375d97b8fa7621">00121</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00667.html#450d0806be9831a70c76fa179b0cb4d3">IsLayoutComplete</a>() {<span class="keywordflow">return</span> this-&gt;LayoutComplete;}
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 <span class="keyword">protected</span>:
<a name="l00124"></a>00124   <a class="code" href="a00532.html" title="a simple fast 2D graph layout">vtkFast2DLayoutStrategy</a>();
<a name="l00125"></a>00125   ~<a class="code" href="a00532.html" title="a simple fast 2D graph layout">vtkFast2DLayoutStrategy</a>();
<a name="l00126"></a>00126 
<a name="l00127"></a><a class="code" href="a00532.html#51ee0478bcb309a78ffa517b33722e10">00127</a>   <span class="keywordtype">int</span>    MaxNumberOfIterations;  <span class="comment">//Maximum number of iterations.</span>
<a name="l00128"></a><a class="code" href="a00532.html#691296a43acb6656f7e7d9838c7e89f7">00128</a>   <span class="keywordtype">float</span>  InitialTemperature;
<a name="l00129"></a><a class="code" href="a00532.html#180d9d18c6a1c1af2f0cd1c3018785bf">00129</a>   <span class="keywordtype">float</span>  CoolDownRate;  <span class="comment">//Cool-down rate.  Note:  Higher # = Slower rate.</span>
<a name="l00130"></a>00130 
<a name="l00131"></a>00131 <span class="keyword">private</span>:
<a name="l00132"></a>00132 
<a name="l00133"></a>00133   <span class="comment">//BTX</span>
<a name="l00134"></a>00134 
<a name="l00135"></a>00135   <span class="comment">// An edge consists of two vertices joined together.</span>
<a name="l00136"></a>00136   <span class="comment">// This struct acts as a "pointer" to those two vertices.</span>
<a name="l00137"></a>00137   <span class="keyword">typedef</span> <span class="keyword">struct </span>
<a name="l00138"></a>00138   {
<a name="l00139"></a>00139     <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> from;
<a name="l00140"></a>00140     <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> to;
<a name="l00141"></a>00141     <span class="keywordtype">float</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210bb2d78b6580449dd87039b05077e2f0d">weight</a>;
<a name="l00142"></a>00142   } vtkLayoutEdge;
<a name="l00143"></a>00143   
<a name="l00144"></a>00144   <span class="comment">// This class 'has a' vtkFastSplatter for the density grid</span>
<a name="l00145"></a>00145   <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer&lt;vtkGraphToPolyData&gt;</a>     GraphToPoly;
<a name="l00146"></a>00146   <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer&lt;vtkFastSplatter&gt;</a>        DensityGrid;
<a name="l00147"></a>00147   <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer&lt;vtkImageData&gt;</a>           SplatImage;
<a name="l00148"></a>00148   <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer&lt;vtkFloatArray&gt;</a>          RepulsionArray;
<a name="l00149"></a>00149   <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer&lt;vtkFloatArray&gt;</a>          AttractionArray;
<a name="l00150"></a>00150   <span class="comment">//ETX</span>
<a name="l00151"></a>00151   
<a name="l00152"></a>00152   vtkLayoutEdge *EdgeArray;
<a name="l00153"></a>00153 
<a name="l00154"></a>00154   <span class="keywordtype">int</span> RandomSeed;
<a name="l00155"></a>00155   <span class="keywordtype">int</span> IterationsPerLayout;
<a name="l00156"></a>00156   <span class="keywordtype">int</span> TotalIterations;
<a name="l00157"></a>00157   <span class="keywordtype">int</span> LayoutComplete;
<a name="l00158"></a>00158   <span class="keywordtype">float</span> Temp;
<a name="l00159"></a>00159   <span class="keywordtype">float</span> RestDistance;
<a name="l00160"></a>00160   
<a name="l00161"></a>00161   <span class="comment">// Private helper methods</span>
<a name="l00162"></a>00162   <span class="keywordtype">void</span> GenerateCircularSplat(<a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a> *splat, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y);
<a name="l00163"></a>00163   <span class="keywordtype">void</span> GenerateGaussianSplat(<a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a> *splat, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y);
<a name="l00164"></a>00164   <span class="keywordtype">void</span> ResolveCoincidentVertices();
<a name="l00165"></a>00165 
<a name="l00166"></a>00166   <a class="code" href="a00532.html" title="a simple fast 2D graph layout">vtkFast2DLayoutStrategy</a>(<span class="keyword">const</span> <a class="code" href="a00532.html" title="a simple fast 2D graph layout">vtkFast2DLayoutStrategy</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00167"></a>00167   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00532.html" title="a simple fast 2D graph layout">vtkFast2DLayoutStrategy</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00168"></a>00168 };
<a name="l00169"></a>00169 
<a name="l00170"></a>00170 <span class="preprocessor">#endif</span>
<a name="l00171"></a>00171 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:37 2009 for VTK by&nbsp;
<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>