VTK  9.2.5
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 void PrintSelf(ostream& os, vtkIndent indent) override;
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) { this->GravityPoint = point; }
134 virtual vtkVector2f GetGravityPoint() { return this->GravityPoint; }
135
140
141protected:
144
146 class Implementation;
147 Implementation* Impl;
150 float Alpha;
151 float Theta;
152 float Charge;
153 float Strength;
154 float Distance;
155 float Gravity;
156 float Friction;
157
158private:
160 void operator=(const vtkIncrementalForceLayout&) = delete;
161};
162#endif
Base class for graph data types.
Definition: vtkGraph.h:296
incremental force-directed layout.
virtual void SetGraph(vtkGraph *g)
Set the graph to be positioned.
~vtkIncrementalForceLayout() override
virtual void SetFixed(vtkIdType fixed)
Set the id of the vertex that will not move during the simulation.
virtual vtkVector2f GetGravityPoint()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkIncrementalForceLayout * New()
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:63
int vtkIdType
Definition: vtkType.h:332