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 
29 #ifndef vtkIncrementalForceLayout_h
30 #define vtkIncrementalForceLayout_h
31 
32 #include "vtkInfovisLayoutModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 #include "vtkVector.h" // For vector ivars
36 
37 class vtkGraph;
38 
39 class VTKINFOVISLAYOUT_EXPORT vtkIncrementalForceLayout : public vtkObject
40 {
41 public:
43  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
45 
47 
50  virtual void SetGraph(vtkGraph* g);
51  vtkGetObjectMacro(Graph, vtkGraph);
53 
55 
59  virtual void SetFixed(vtkIdType fixed);
60  vtkGetMacro(Fixed, vtkIdType);
62 
64 
67  vtkSetMacro(Alpha, float);
68  vtkGetMacro(Alpha, float);
70 
72 
77  vtkSetMacro(Theta, float);
78  vtkGetMacro(Theta, float);
80 
82 
86  vtkSetMacro(Charge, float);
87  vtkGetMacro(Charge, float);
89 
91 
94  vtkSetMacro(Strength, float);
95  vtkGetMacro(Strength, float);
97 
99 
103  vtkSetMacro(Distance, float);
104  vtkGetMacro(Distance, float);
106 
108 
112  vtkSetMacro(Gravity, float);
113  vtkGetMacro(Gravity, float);
115 
117 
121  vtkSetMacro(Friction, float);
122  vtkGetMacro(Friction, float);
124 
130  virtual void SetGravityPoint(const vtkVector2f &point)
131  { this->GravityPoint = point; }
133  { return this->GravityPoint; }
134 
138  void UpdatePositions();
139 
140 protected:
142  ~vtkIncrementalForceLayout() VTK_OVERRIDE;
143 
144  vtkGraph* Graph;
145  class Implementation;
146  Implementation* Impl;
147  vtkIdType Fixed;
148  vtkVector2f GravityPoint;
149  float Alpha;
150  float Theta;
151  float Charge;
152  float Strength;
153  float Distance;
154  float Gravity;
155  float Friction;
156 
157 private:
158  vtkIncrementalForceLayout(const vtkIncrementalForceLayout &) VTK_DELETE_FUNCTION;
159  void operator=(const vtkIncrementalForceLayout &) VTK_DELETE_FUNCTION;
160 };
161 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:53
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:345
Base class for graph data types.
Definition: vtkGraph.h:281
a simple class to control print indentation
Definition: vtkIndent.h:33
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.