VTK
vtkRandomLayoutStrategy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRandomLayoutStrategy.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 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
35 #ifndef vtkRandomLayoutStrategy_h
36 #define vtkRandomLayoutStrategy_h
37 
38 #include "vtkInfovisLayoutModule.h" // For export macro
39 #include "vtkGraphLayoutStrategy.h"
40 
41 class VTKINFOVISLAYOUT_EXPORT vtkRandomLayoutStrategy : public vtkGraphLayoutStrategy
42 {
43 public:
44  static vtkRandomLayoutStrategy *New();
45 
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
55  vtkSetClampMacro(RandomSeed, int, 0, VTK_INT_MAX);
56  vtkGetMacro(RandomSeed, int);
58 
60 
65  vtkSetVector6Macro(GraphBounds,double);
66  vtkGetVectorMacro(GraphBounds,double,6);
68 
70 
75  vtkSetMacro(AutomaticBoundsComputation, vtkTypeBool);
76  vtkGetMacro(AutomaticBoundsComputation, vtkTypeBool);
77  vtkBooleanMacro(AutomaticBoundsComputation, vtkTypeBool);
79 
81 
86  vtkSetMacro(ThreeDimensionalLayout, vtkTypeBool);
87  vtkGetMacro(ThreeDimensionalLayout, vtkTypeBool);
88  vtkBooleanMacro(ThreeDimensionalLayout, vtkTypeBool);
90 
94  void SetGraph(vtkGraph *graph) override;
95 
99  void Layout() override;
100 
101 protected:
103  ~vtkRandomLayoutStrategy() override;
104 
106  double GraphBounds[6];
108  vtkTypeBool ThreeDimensionalLayout; //Boolean for a third dimension.
109 private:
110 
112  void operator=(const vtkRandomLayoutStrategy&) = delete;
113 };
114 
115 #endif
116 
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:159
abstract superclass for all graph layout strategies
int vtkTypeBool
Definition: vtkABI.h:69
Base class for graph data types.
Definition: vtkGraph.h:287
a simple class to control print indentation
Definition: vtkIndent.h:39
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. ...