<!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/vtkSimple2DLayoutStrategy.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/Infovis/vtkSimple2DLayoutStrategy.h</h1><a href="a03059.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: vtkSimple2DLayoutStrategy.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="l00040"></a>00040 <span class="preprocessor">#ifndef __vtkSimple2DLayoutStrategy_h</span> <a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define __vtkSimple2DLayoutStrategy_h</span> <a name="l00042"></a>00042 <span class="preprocessor"></span> <a name="l00043"></a>00043 <span class="preprocessor">#include "<a class="code" href="a03027.html">vtkGraphLayoutStrategy.h</a>"</span> <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="keyword">class </span><a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a>; <a name="l00046"></a>00046 <a name="l00047"></a><a class="code" href="a01545.html">00047</a> <span class="keyword">class </span><a class="code" href="a02170.html#73f1c245b8811be3c4b76b0a89784e70">VTK_INFOVIS_EXPORT</a> <a class="code" href="a01545.html" title="a simple 2D graph layout">vtkSimple2DLayoutStrategy</a> : <span class="keyword">public</span> <a class="code" href="a00667.html" title="abstract superclass for all graph layout strategies">vtkGraphLayoutStrategy</a> <a name="l00048"></a>00048 { <a name="l00049"></a>00049 <span class="keyword">public</span>: <a name="l00050"></a>00050 <span class="keyword">static</span> <a class="code" href="a01545.html" title="a simple 2D graph layout">vtkSimple2DLayoutStrategy</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>(); <a name="l00051"></a>00051 <a name="l00052"></a><a class="code" href="a01545.html#13945a5a9dbec9bc33414a44ddd545d9">00052</a> vtkTypeRevisionMacro(<a class="code" href="a01545.html" title="a simple 2D graph layout">vtkSimple2DLayoutStrategy</a>, <a class="code" href="a00667.html" title="abstract superclass for all graph layout strategies">vtkGraphLayoutStrategy</a>); <a name="l00053"></a>00053 <span class="keywordtype">void</span> <a class="code" href="a00667.html#920e5873c1be5fe0b75c11beca20ed4b">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00054"></a>00054 <a name="l00056"></a>00056 <a name="l00059"></a>00059 vtkSetClampMacro(RandomSeed, <span class="keywordtype">int</span>, 0, <a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>); <a name="l00060"></a>00060 vtkGetMacro(RandomSeed, <span class="keywordtype">int</span>); <a name="l00062"></a>00062 <a name="l00064"></a>00064 <a name="l00069"></a>00069 vtkSetClampMacro(MaxNumberOfIterations, <span class="keywordtype">int</span>, 0, <a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>); <a name="l00070"></a>00070 vtkGetMacro(MaxNumberOfIterations, <span class="keywordtype">int</span>); <a name="l00072"></a>00072 <a name="l00074"></a>00074 <a name="l00078"></a>00078 vtkSetClampMacro(IterationsPerLayout, <span class="keywordtype">int</span>, 0, <a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>); <a name="l00079"></a>00079 vtkGetMacro(IterationsPerLayout, <span class="keywordtype">int</span>); <a name="l00081"></a>00081 <a name="l00083"></a>00083 <a name="l00086"></a>00086 vtkSetClampMacro(InitialTemperature, <span class="keywordtype">float</span>, 0.0, <a class="code" href="a02149.html#f90f70cb5ac68abc5389df442fb18b0b">VTK_FLOAT_MAX</a>); <a name="l00087"></a>00087 vtkGetMacro(InitialTemperature, <span class="keywordtype">float</span>); <a name="l00089"></a>00089 <a name="l00091"></a>00091 <a name="l00095"></a>00095 vtkSetClampMacro(CoolDownRate, <span class="keywordtype">double</span>, 0.01, <a class="code" href="a02149.html#a933eb1ff8ef089de59cce7b41e21261">VTK_DOUBLE_MAX</a>); <a name="l00096"></a>00096 vtkGetMacro(CoolDownRate, <span class="keywordtype">double</span>); <a name="l00098"></a>00098 <a name="l00100"></a>00100 <a name="l00103"></a>00103 vtkSetMacro(Jitter, <span class="keywordtype">bool</span>); <a name="l00104"></a>00104 vtkGetMacro(Jitter, <span class="keywordtype">bool</span>); <a name="l00106"></a>00106 <a name="l00108"></a>00108 <a name="l00110"></a>00110 vtkSetMacro(RestDistance, <span class="keywordtype">float</span>); <a name="l00111"></a>00111 vtkGetMacro(RestDistance, <span class="keywordtype">float</span>); <a name="l00113"></a>00113 <a name="l00116"></a>00116 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00667.html#9995da8160277734ae47752207211853">Initialize</a>(); <a name="l00117"></a>00117 <a name="l00122"></a>00122 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00667.html#14f90ab69c42daa54714afdf45fe0148">Layout</a>(); <a name="l00123"></a>00123 <a name="l00126"></a><a class="code" href="a01545.html#fcd8f0b2f6a3bcb821f55dbd138525c3">00126</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->LayoutComplete;} <a name="l00127"></a>00127 <a name="l00128"></a>00128 <span class="keyword">protected</span>: <a name="l00129"></a>00129 <a class="code" href="a01545.html" title="a simple 2D graph layout">vtkSimple2DLayoutStrategy</a>(); <a name="l00130"></a>00130 ~<a class="code" href="a01545.html" title="a simple 2D graph layout">vtkSimple2DLayoutStrategy</a>(); <a name="l00131"></a>00131 <a name="l00132"></a><a class="code" href="a01545.html#a0233713a58deff9e12a3f34e2580bdf">00132</a> <span class="keywordtype">int</span> MaxNumberOfIterations; <span class="comment">//Maximum number of iterations.</span> <a name="l00133"></a><a class="code" href="a01545.html#72d016cab8fc81b3b97b74a9c6d9ddf0">00133</a> <span class="keywordtype">float</span> InitialTemperature; <a name="l00134"></a><a class="code" href="a01545.html#51c45ac88da72dbff62480e10d696b6f">00134</a> <span class="keywordtype">float</span> CoolDownRate; <span class="comment">//Cool-down rate. Note: Higher # = Slower rate.</span> <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="keyword">private</span>: <a name="l00137"></a>00137 <a name="l00138"></a>00138 <span class="comment">//BTX</span> <a name="l00139"></a>00139 <span class="comment">// An edge consists of two vertices joined together.</span> <a name="l00140"></a>00140 <span class="comment">// This struct acts as a "pointer" to those two vertices.</span> <a name="l00141"></a>00141 <span class="keyword">typedef</span> <span class="keyword">struct </span> <a name="l00142"></a>00142 { <a name="l00143"></a>00143 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> from; <a name="l00144"></a>00144 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> to; <a name="l00145"></a>00145 <span class="keywordtype">float</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210bb2d78b6580449dd87039b05077e2f0d">weight</a>; <a name="l00146"></a>00146 } vtkLayoutEdge; <a name="l00147"></a>00147 <a name="l00148"></a>00148 <span class="comment">// These are for storage of repulsion and attraction</span> <a name="l00149"></a>00149 <a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a> *RepulsionArray; <a name="l00150"></a>00150 <a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a> *AttractionArray; <a name="l00151"></a>00151 vtkLayoutEdge *EdgeArray; <a name="l00152"></a>00152 <span class="comment">//ETX</span> <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 <span class="keywordtype">bool</span> Jitter; <a name="l00161"></a>00161 <a name="l00162"></a>00162 <a class="code" href="a01545.html" title="a simple 2D graph layout">vtkSimple2DLayoutStrategy</a>(<span class="keyword">const</span> <a class="code" href="a01545.html" title="a simple 2D graph layout">vtkSimple2DLayoutStrategy</a>&); <span class="comment">// Not implemented.</span> <a name="l00163"></a>00163 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01545.html" title="a simple 2D graph layout">vtkSimple2DLayoutStrategy</a>&); <span class="comment">// Not implemented.</span> <a name="l00164"></a>00164 }; <a name="l00165"></a>00165 <a name="l00166"></a>00166 <span class="preprocessor">#endif</span> <a name="l00167"></a>00167 <span class="preprocessor"></span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:38 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>