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 -------------------------------------------------------------------------*/
32 #ifndef vtkRandomLayoutStrategy_h
33 #define vtkRandomLayoutStrategy_h
34 
35 #include "vtkInfovisLayoutModule.h" // For export macro
36 #include "vtkGraphLayoutStrategy.h"
37 
38 class VTKINFOVISLAYOUT_EXPORT vtkRandomLayoutStrategy : public vtkGraphLayoutStrategy
39 {
40 public:
41  static vtkRandomLayoutStrategy *New();
42 
44  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45 
47 
52  vtkSetClampMacro(RandomSeed, int, 0, VTK_INT_MAX);
53  vtkGetMacro(RandomSeed, int);
55 
57 
62  vtkSetVector6Macro(GraphBounds,double);
63  vtkGetVectorMacro(GraphBounds,double,6);
65 
67 
72  vtkSetMacro(AutomaticBoundsComputation, int);
73  vtkGetMacro(AutomaticBoundsComputation, int);
74  vtkBooleanMacro(AutomaticBoundsComputation, int);
76 
78 
83  vtkSetMacro(ThreeDimensionalLayout, int);
84  vtkGetMacro(ThreeDimensionalLayout, int);
85  vtkBooleanMacro(ThreeDimensionalLayout, int);
87 
91  void SetGraph(vtkGraph *graph) VTK_OVERRIDE;
92 
96  void Layout() VTK_OVERRIDE;
97 
98 protected:
100  ~vtkRandomLayoutStrategy() VTK_OVERRIDE;
101 
102  int RandomSeed;
103  double GraphBounds[6];
104  int AutomaticBoundsComputation;
105  int ThreeDimensionalLayout; //Boolean for a third dimension.
106 private:
107 
108  vtkRandomLayoutStrategy(const vtkRandomLayoutStrategy&) VTK_DELETE_FUNCTION;
109  void operator=(const vtkRandomLayoutStrategy&) VTK_DELETE_FUNCTION;
110 };
111 
112 #endif
113 
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:157
abstract superclass for all graph layout strategies
Base class for graph data types.
Definition: vtkGraph.h:281
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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. ...