Sophie

Sophie

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

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/vtkForceDirectedLayoutStrategy.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/vtkForceDirectedLayoutStrategy.h</h1><a href="a03023.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: vtkForceDirectedLayoutStrategy.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="l00036"></a>00036 <span class="preprocessor">#ifndef __vtkForceDirectedLayoutStrategy_h</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define __vtkForceDirectedLayoutStrategy_h</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="a03027.html">vtkGraphLayoutStrategy.h</a>"</span>
<a name="l00040"></a>00040 
<a name="l00041"></a><a class="code" href="a00562.html">00041</a> <span class="keyword">class </span><a class="code" href="a02170.html#73f1c245b8811be3c4b76b0a89784e70">VTK_INFOVIS_EXPORT</a> <a class="code" href="a00562.html" title="a force directed graph layout algorithm">vtkForceDirectedLayoutStrategy</a> : <span class="keyword">public</span> <a class="code" href="a00667.html" title="abstract superclass for all graph layout strategies">vtkGraphLayoutStrategy</a> 
<a name="l00042"></a>00042 {
<a name="l00043"></a>00043 <span class="keyword">public</span>:
<a name="l00044"></a>00044   <span class="keyword">static</span> <a class="code" href="a00562.html" title="a force directed graph layout algorithm">vtkForceDirectedLayoutStrategy</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>();
<a name="l00045"></a>00045 
<a name="l00046"></a><a class="code" href="a00562.html#6969a0fd15b5f41e014f7c516c39218f">00046</a>   vtkTypeRevisionMacro(<a class="code" href="a00562.html" title="a force directed graph layout algorithm">vtkForceDirectedLayoutStrategy</a>, <a class="code" href="a00667.html" title="abstract superclass for all graph layout strategies">vtkGraphLayoutStrategy</a>);
<a name="l00047"></a>00047   <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="l00048"></a>00048 
<a name="l00050"></a>00050 
<a name="l00053"></a>00053   vtkSetClampMacro(RandomSeed, <span class="keywordtype">int</span>, 0, <a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>);
<a name="l00054"></a>00054   vtkGetMacro(RandomSeed, <span class="keywordtype">int</span>);
<a name="l00056"></a>00056 
<a name="l00058"></a>00058 
<a name="l00061"></a>00061   vtkSetVector6Macro(GraphBounds,<span class="keywordtype">double</span>);
<a name="l00062"></a>00062   vtkGetVectorMacro(GraphBounds,<span class="keywordtype">double</span>,6);
<a name="l00064"></a>00064 
<a name="l00066"></a>00066 
<a name="l00069"></a>00069   vtkSetMacro(AutomaticBoundsComputation, <span class="keywordtype">int</span>);
<a name="l00070"></a>00070   vtkGetMacro(AutomaticBoundsComputation, <span class="keywordtype">int</span>);
<a name="l00071"></a>00071   vtkBooleanMacro(AutomaticBoundsComputation, <span class="keywordtype">int</span>);
<a name="l00073"></a>00073 
<a name="l00075"></a>00075 
<a name="l00079"></a>00079   vtkSetClampMacro(MaxNumberOfIterations, <span class="keywordtype">int</span>, 0, <a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>);
<a name="l00080"></a>00080   vtkGetMacro(MaxNumberOfIterations, <span class="keywordtype">int</span>);
<a name="l00082"></a>00082   
<a name="l00084"></a>00084 
<a name="l00088"></a>00088   vtkSetClampMacro(IterationsPerLayout, <span class="keywordtype">int</span>, 0, <a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>);
<a name="l00089"></a>00089   vtkGetMacro(IterationsPerLayout, <span class="keywordtype">int</span>);
<a name="l00091"></a>00091 
<a name="l00093"></a>00093 
<a name="l00096"></a>00096   vtkSetClampMacro(CoolDownRate, <span class="keywordtype">double</span>, 0.01, <a class="code" href="a02149.html#a933eb1ff8ef089de59cce7b41e21261">VTK_DOUBLE_MAX</a>);
<a name="l00097"></a>00097   vtkGetMacro(CoolDownRate, <span class="keywordtype">double</span>);
<a name="l00099"></a>00099 
<a name="l00101"></a>00101 
<a name="l00104"></a>00104   vtkSetMacro(ThreeDimensionalLayout, <span class="keywordtype">int</span>);
<a name="l00105"></a>00105   vtkGetMacro(ThreeDimensionalLayout, <span class="keywordtype">int</span>);
<a name="l00106"></a>00106   vtkBooleanMacro(ThreeDimensionalLayout, <span class="keywordtype">int</span>);
<a name="l00108"></a>00108 
<a name="l00110"></a>00110 
<a name="l00112"></a>00112   vtkSetMacro(RandomInitialPoints, <span class="keywordtype">int</span>);
<a name="l00113"></a>00113   vtkGetMacro(RandomInitialPoints, <span class="keywordtype">int</span>);
<a name="l00114"></a>00114   vtkBooleanMacro(RandomInitialPoints, <span class="keywordtype">int</span>);
<a name="l00116"></a>00116 
<a name="l00118"></a>00118 
<a name="l00120"></a>00120   vtkSetClampMacro(InitialTemperature, <span class="keywordtype">float</span>, 0.0, <a class="code" href="a02149.html#f90f70cb5ac68abc5389df442fb18b0b">VTK_FLOAT_MAX</a>);
<a name="l00121"></a>00121   vtkGetMacro(InitialTemperature, <span class="keywordtype">float</span>);
<a name="l00123"></a>00123 
<a name="l00126"></a>00126   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00667.html#9995da8160277734ae47752207211853">Initialize</a>();
<a name="l00127"></a>00127   
<a name="l00132"></a>00132   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00667.html#14f90ab69c42daa54714afdf45fe0148">Layout</a>();
<a name="l00133"></a>00133   
<a name="l00136"></a><a class="code" href="a00562.html#91b1dc5d10240ad4a41a24cfc132343d">00136</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="l00137"></a>00137 
<a name="l00138"></a>00138 <span class="keyword">protected</span>:
<a name="l00139"></a>00139   <a class="code" href="a00562.html" title="a force directed graph layout algorithm">vtkForceDirectedLayoutStrategy</a>();
<a name="l00140"></a>00140   ~<a class="code" href="a00562.html" title="a force directed graph layout algorithm">vtkForceDirectedLayoutStrategy</a>();
<a name="l00141"></a>00141 
<a name="l00142"></a><a class="code" href="a00562.html#cbfd31460488a880bb67dc2d4abeebff">00142</a>   <span class="keywordtype">double</span> GraphBounds[6];
<a name="l00143"></a><a class="code" href="a00562.html#a843859fc2eb1883c44658b1c1a75507">00143</a>   <span class="keywordtype">int</span>   AutomaticBoundsComputation;  <span class="comment">//Boolean controls automatic bounds calc.</span>
<a name="l00144"></a><a class="code" href="a00562.html#e943c679ec935c154af12186a0773cf5">00144</a>   <span class="keywordtype">int</span>   MaxNumberOfIterations;  <span class="comment">//Maximum number of iterations.</span>
<a name="l00145"></a><a class="code" href="a00562.html#b5f5dcde0d11bbbdf17ee73f5a852459">00145</a>   <span class="keywordtype">double</span> CoolDownRate;  <span class="comment">//Cool-down rate.  Note:  Higher # = Slower rate.</span>
<a name="l00146"></a><a class="code" href="a00562.html#4dec8b3f2c2a10b4f72d07a24c9dd258">00146</a>   <span class="keywordtype">double</span> InitialTemperature;
<a name="l00147"></a><a class="code" href="a00562.html#a8a3d3f2efe78cff446252a2b4d9c84a">00147</a>   <span class="keywordtype">int</span>   ThreeDimensionalLayout;  <span class="comment">//Boolean for a third dimension.</span>
<a name="l00148"></a><a class="code" href="a00562.html#57c6efb964979c1ab65834d45e41d448">00148</a>   <span class="keywordtype">int</span> RandomInitialPoints; <span class="comment">//Boolean for having random points</span>
<a name="l00149"></a>00149 <span class="keyword">private</span>:
<a name="l00150"></a>00150 
<a name="l00151"></a>00151   <span class="comment">//BTX</span>
<a name="l00152"></a>00152   <span class="comment">// A vertex contains a position and a displacement.</span>
<a name="l00153"></a>00153   <span class="keyword">typedef</span> <span class="keyword">struct </span>
<a name="l00154"></a>00154   {
<a name="l00155"></a>00155     <span class="keywordtype">double</span> x[3];
<a name="l00156"></a>00156     <span class="keywordtype">double</span> d[3];
<a name="l00157"></a>00157   } vtkLayoutVertex;
<a name="l00158"></a>00158 
<a name="l00159"></a>00159   <span class="comment">// An edge consists of two vertices joined together.</span>
<a name="l00160"></a>00160   <span class="comment">// This struct acts as a "pointer" to those two vertices.</span>
<a name="l00161"></a>00161   <span class="keyword">typedef</span> <span class="keyword">struct </span>
<a name="l00162"></a>00162   {
<a name="l00163"></a>00163     <span class="keywordtype">int</span> t;
<a name="l00164"></a>00164     <span class="keywordtype">int</span> u;
<a name="l00165"></a>00165   } vtkLayoutEdge;
<a name="l00166"></a>00166   <span class="comment">//ETX</span>
<a name="l00167"></a>00167 
<a name="l00168"></a>00168   <span class="keywordtype">int</span> RandomSeed;
<a name="l00169"></a>00169   <span class="keywordtype">int</span> IterationsPerLayout;
<a name="l00170"></a>00170   <span class="keywordtype">int</span> TotalIterations;
<a name="l00171"></a>00171   <span class="keywordtype">int</span> LayoutComplete;
<a name="l00172"></a>00172   <span class="keywordtype">double</span> Temp;
<a name="l00173"></a>00173   <span class="keywordtype">double</span> optDist;
<a name="l00174"></a>00174   vtkLayoutVertex *v;
<a name="l00175"></a>00175   vtkLayoutEdge *e;
<a name="l00176"></a>00176   
<a name="l00177"></a>00177   <a class="code" href="a00562.html" title="a force directed graph layout algorithm">vtkForceDirectedLayoutStrategy</a>(<span class="keyword">const</span> <a class="code" href="a00562.html" title="a force directed graph layout algorithm">vtkForceDirectedLayoutStrategy</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00178"></a>00178   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00562.html" title="a force directed graph layout algorithm">vtkForceDirectedLayoutStrategy</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00179"></a>00179 };
<a name="l00180"></a>00180 
<a name="l00181"></a>00181 <span class="preprocessor">#endif</span>
<a name="l00182"></a>00182 <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>