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
40class vtkGraph;
41
42class VTKINFOVISLAYOUT_EXPORT vtkIncrementalForceLayout : public vtkObject
43{
44public:
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
142
143protected:
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
160private:
161 vtkIncrementalForceLayout(const vtkIncrementalForceLayout &) VTK_DELETE_FUNCTION;
162 void operator=(const vtkIncrementalForceLayout &) VTK_DELETE_FUNCTION;
163};
164#endif
Base class for graph data types.
Definition: vtkGraph.h:288
incremental force-directed layout.
virtual void SetGraph(vtkGraph *g)
Set the graph to be positioned.
virtual void SetFixed(vtkIdType fixed)
Set the id of the vertex that will not move during the simulation.
virtual vtkVector2f GetGravityPoint()
static vtkIncrementalForceLayout * New()
virtual void PrintSelf(ostream &os, vtkIndent indent)
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.
void UpdatePositions()
Perform one iteration of the force-directed layout.
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
@ point
Definition: vtkX3D.h:236
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287