VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Infovis/Layout/vtkIncrementalForceLayout.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkScatterPlotMatrix.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00031 #ifndef vtkIncrementalForceLayout_h
00032 #define vtkIncrementalForceLayout_h
00033 
00034 #include "vtkInfovisLayoutModule.h" // For export macro
00035 #include "vtkObject.h"
00036 
00037 #include "vtkVector.h" // For vector ivars
00038 
00039 class vtkGraph;
00040 
00041 class VTKINFOVISLAYOUT_EXPORT vtkIncrementalForceLayout : public vtkObject
00042 {
00043 public:
00044   vtkTypeMacro(vtkIncrementalForceLayout, vtkObject);
00045   virtual void PrintSelf(ostream &os, vtkIndent indent);
00046   static vtkIncrementalForceLayout* New();
00047 
00049 
00050   virtual void SetGraph(vtkGraph* g);
00051   vtkGetObjectMacro(Graph, vtkGraph);
00053 
00055 
00057   virtual void SetFixed(vtkIdType fixed);
00058   vtkGetMacro(Fixed, vtkIdType);
00060 
00062 
00063   vtkSetMacro(Alpha, float);
00064   vtkGetMacro(Alpha, float);
00066 
00068 
00070   vtkSetMacro(Theta, float);
00071   vtkGetMacro(Theta, float);
00073 
00075 
00077   vtkSetMacro(Charge, float);
00078   vtkGetMacro(Charge, float);
00080 
00082 
00083   vtkSetMacro(Strength, float);
00084   vtkGetMacro(Strength, float);
00086 
00088 
00090   vtkSetMacro(Distance, float);
00091   vtkGetMacro(Distance, float);
00093 
00095 
00097   vtkSetMacro(Gravity, float);
00098   vtkGetMacro(Gravity, float);
00100 
00102 
00104   vtkSetMacro(Friction, float);
00105   vtkGetMacro(Friction, float);
00107 
00108 //BTX
00110 
00113   virtual void SetGravityPoint(const vtkVector2f &point)
00114     { this->GravityPoint = point; }
00115   virtual vtkVector2f GetGravityPoint()
00116     { return this->GravityPoint; }
00117 //ETX
00119 
00121   void UpdatePositions();
00122 
00123 protected:
00124   vtkIncrementalForceLayout();
00125   ~vtkIncrementalForceLayout();
00126 
00127   vtkGraph* Graph;
00128   class Implementation;
00129   Implementation* Impl;
00130   vtkIdType Fixed;
00131   vtkVector2f GravityPoint;
00132   float Alpha;
00133   float Theta;
00134   float Charge;
00135   float Strength;
00136   float Distance;
00137   float Gravity;
00138   float Friction;
00139 
00140 private:
00141   vtkIncrementalForceLayout(const vtkIncrementalForceLayout &); // Not implemented.
00142   void operator=(const vtkIncrementalForceLayout &); // Not implemented.
00143 };
00144 #endif