VTK
vtkCosmicTreeLayoutStrategy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCosmicTreeLayoutStrategy.h
5 
6 =========================================================================*/
7 /*----------------------------------------------------------------------------
8  Copyright (c) Sandia Corporation
9  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
10 ----------------------------------------------------------------------------*/
30 #ifndef vtkCosmicTreeLayoutStrategy_h
31 #define vtkCosmicTreeLayoutStrategy_h
32 
33 #include "vtkInfovisLayoutModule.h" // For export macro
34 #include "vtkGraphLayoutStrategy.h"
35 
36 class vtkDoubleArray;
37 class vtkDataArray;
38 class vtkPoints;
39 class vtkTree;
40 
41 class VTKINFOVISLAYOUT_EXPORT vtkCosmicTreeLayoutStrategy : public vtkGraphLayoutStrategy
42 {
43 public:
45  void PrintSelf( ostream& os, vtkIndent indent ) override;
47 
51  void Layout() override;
52 
54 
62  vtkSetMacro(SizeLeafNodesOnly,vtkTypeBool);
63  vtkGetMacro(SizeLeafNodesOnly,vtkTypeBool);
64  vtkBooleanMacro(SizeLeafNodesOnly,vtkTypeBool);
66 
68 
76  vtkSetMacro(LayoutDepth,int);
77  vtkGetMacro(LayoutDepth,int);
79 
81 
90  vtkSetMacro(LayoutRoot,vtkIdType);
91  vtkGetMacro(LayoutRoot,vtkIdType);
93 
95 
101  vtkSetStringMacro(NodeSizeArrayName);
102  vtkGetStringMacro(NodeSizeArrayName);
104 
105 protected:
106 
109  {
112  ALL
113  };
114 
116  ~vtkCosmicTreeLayoutStrategy() override;
117 
121  void LayoutChildren(
122  vtkTree* tree, vtkPoints* newPoints, vtkDoubleArray* radii, vtkDoubleArray* scale,
123  vtkIdType root, int depth, RadiusMode mode );
124 
131  void OffsetChildren(
132  vtkTree* tree, vtkPoints* pts, vtkDoubleArray* radii, vtkDoubleArray* scale,
133  double parent[4], vtkIdType root, int depth, RadiusMode mode );
134 
143  vtkDoubleArray* CreateRadii( vtkIdType numVertices, double initialValue, vtkDataArray* inputRadii );
144 
151  vtkDoubleArray* CreateScaleFactors( vtkIdType numVertices );
152 
157 
158 private:
160  void operator = ( const vtkCosmicTreeLayoutStrategy& ) = delete;
161 };
162 
163 #endif // vtkCosmicTreeLayoutStrategy_h
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkIdType
Definition: vtkType.h:345
dynamic, self-adjusting array of double
abstract superclass for all graph layout strategies
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:33
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
tree layout strategy reminiscent of astronomical systems
RadiusMode
How are node sizes specified?
No node sizes specified... unit radius is assumed.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
A rooted tree data structure.
Definition: vtkTree.h:54
represent and manipulate 3D points
Definition: vtkPoints.h:33
virtual void Layout()=0
This is the layout method where the graph that was set in SetGraph() is laid out.
Only leaf node sizes specified... parents are calculated during layout.