VTK  9.3.20240419
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:
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:
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
abstract superclass for all graph layout strategies
Base class for graph data types.
Definition: vtkGraph.h:340
a simple class to control print indentation
Definition: vtkIndent.h:108
randomly places vertices in 2 or 3 dimensions
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Layout() override
Perform the random layout.
void SetGraph(vtkGraph *graph) override
Set the graph to layout.
static vtkRandomLayoutStrategy * New()
~vtkRandomLayoutStrategy() override
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_INT_MAX
Definition: vtkType.h:144