VTK
vtkIncrementalForceLayout.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkScatterPlotMatrix.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
32 #ifndef vtkIncrementalForceLayout_h
33 #define vtkIncrementalForceLayout_h
34 
35 #include "vtkInfovisLayoutModule.h" // For export macro
36 #include "vtkObject.h"
37 
38 #include "vtkVector.h" // For vector ivars
39 
40 class vtkGraph;
41 
42 class VTKINFOVISLAYOUT_EXPORT vtkIncrementalForceLayout : public vtkObject
43 {
44 public:
46  virtual void PrintSelf(ostream &os, vtkIndent indent);
48 
50 
53  virtual void SetGraph(vtkGraph* g);
54  vtkGetObjectMacro(Graph, vtkGraph);
56 
58 
62  virtual void SetFixed(vtkIdType fixed);
63  vtkGetMacro(Fixed, vtkIdType);
65 
67 
70  vtkSetMacro(Alpha, float);
71  vtkGetMacro(Alpha, float);
73 
75 
80  vtkSetMacro(Theta, float);
81  vtkGetMacro(Theta, float);
83 
85 
89  vtkSetMacro(Charge, float);
90  vtkGetMacro(Charge, float);
92 
94 
97  vtkSetMacro(Strength, float);
98  vtkGetMacro(Strength, float);
100 
102 
106  vtkSetMacro(Distance, float);
107  vtkGetMacro(Distance, float);
109 
111 
115  vtkSetMacro(Gravity, float);
116  vtkGetMacro(Gravity, float);
118 
120 
124  vtkSetMacro(Friction, float);
125  vtkGetMacro(Friction, float);
127 
133  virtual void SetGravityPoint(const vtkVector2f &point)
134  { this->GravityPoint = point; }
136  { return this->GravityPoint; }
137 
141  void UpdatePositions();
142 
143 protected:
146 
148  class Implementation;
149  Implementation* Impl;
152  float Alpha;
153  float Theta;
154  float Charge;
155  float Strength;
156  float Distance;
157  float Gravity;
158  float Friction;
159 
160 private:
161  vtkIncrementalForceLayout(const vtkIncrementalForceLayout &) VTK_DELETE_FUNCTION;
162  void operator=(const vtkIncrementalForceLayout &) VTK_DELETE_FUNCTION;
163 };
164 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetGravityPoint(const vtkVector2f &point)
Set the gravity point where all vertices will migrate.
int vtkIdType
Definition: vtkType.h:287
Base class for graph data types.
Definition: vtkGraph.h:287
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkVector2f GetGravityPoint()
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
incremental force-directed layout.