VTK  9.3.1
vtkRandomLayoutStrategy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
19 #ifndef vtkRandomLayoutStrategy_h
20 #define vtkRandomLayoutStrategy_h
21 
22 #include "vtkGraphLayoutStrategy.h"
23 #include "vtkInfovisLayoutModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKINFOVISLAYOUT_EXPORT vtkRandomLayoutStrategy : public vtkGraphLayoutStrategy
27 {
28 public:
29  static vtkRandomLayoutStrategy* New();
30 
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35 
40  vtkSetClampMacro(RandomSeed, int, 0, VTK_INT_MAX);
41  vtkGetMacro(RandomSeed, int);
43 
45 
50  vtkSetVector6Macro(GraphBounds, double);
51  vtkGetVectorMacro(GraphBounds, double, 6);
53 
55 
60  vtkSetMacro(AutomaticBoundsComputation, vtkTypeBool);
61  vtkGetMacro(AutomaticBoundsComputation, vtkTypeBool);
62  vtkBooleanMacro(AutomaticBoundsComputation, vtkTypeBool);
64 
66 
71  vtkSetMacro(ThreeDimensionalLayout, vtkTypeBool);
72  vtkGetMacro(ThreeDimensionalLayout, vtkTypeBool);
73  vtkBooleanMacro(ThreeDimensionalLayout, vtkTypeBool);
75 
79  void SetGraph(vtkGraph* graph) override;
80 
84  void Layout() override;
85 
86 protected:
88  ~vtkRandomLayoutStrategy() override;
89 
91  double GraphBounds[6];
93  vtkTypeBool ThreeDimensionalLayout; // Boolean for a third dimension.
94 private:
96  void operator=(const vtkRandomLayoutStrategy&) = delete;
97 };
98 
99 VTK_ABI_NAMESPACE_END
100 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetGraph(vtkGraph *graph)
Setting the graph for the layout strategy.
randomly places vertices in 2 or 3 dimensions
#define VTK_INT_MAX
Definition: vtkType.h:144
abstract superclass for all graph layout strategies
int vtkTypeBool
Definition: vtkABI.h:64
Base class for graph data types.
Definition: vtkGraph.h:280
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void Layout()=0
This is the layout method where the graph that was set in SetGraph() is laid out. ...