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 ----------------------------------------------------------------------------*/
32 #ifndef vtkCosmicTreeLayoutStrategy_h
33 #define vtkCosmicTreeLayoutStrategy_h
34 
35 #include "vtkInfovisLayoutModule.h" // For export macro
36 #include "vtkGraphLayoutStrategy.h"
37 
38 class vtkDoubleArray;
39 class vtkDataArray;
40 class vtkPoints;
41 class vtkTree;
42 
44 {
45 public:
47  virtual void PrintSelf( ostream& os, vtkIndent indent );
49 
51  virtual void Layout();
52 
54 
59  vtkSetMacro(SizeLeafNodesOnly,int);
60  vtkGetMacro(SizeLeafNodesOnly,int);
61  vtkBooleanMacro(SizeLeafNodesOnly,int);
63 
65 
70  vtkSetMacro(LayoutDepth,int);
71  vtkGetMacro(LayoutDepth,int);
73 
75 
81  vtkSetMacro(LayoutRoot,vtkIdType);
82  vtkGetMacro(LayoutRoot,vtkIdType);
84 
86 
89  vtkSetStringMacro(NodeSizeArrayName);
90  vtkGetStringMacro(NodeSizeArrayName);
92 
93 protected:
94 
95  //BTX
98  {
99  NONE,
101  ALL
102  };
103  //ETX
104 
106  virtual ~vtkCosmicTreeLayoutStrategy();
107 
108  //BTX
110 
111  void LayoutChildren(
112  vtkTree* tree, vtkPoints* newPoints, vtkDoubleArray* radii, vtkDoubleArray* scale,
113  vtkIdType root, int depth, RadiusMode mode );
115 
117 
121  void OffsetChildren(
122  vtkTree* tree, vtkPoints* pts, vtkDoubleArray* radii, vtkDoubleArray* scale,
123  double parent[4], vtkIdType root, int depth, RadiusMode mode );
124  //ETX
126 
135  vtkDoubleArray* CreateRadii( vtkIdType numVertices, double initialValue, vtkDataArray* inputRadii );
136 
141  vtkDoubleArray* CreateScaleFactors( vtkIdType numVertices );
142 
147 
148 private:
149  vtkCosmicTreeLayoutStrategy( const vtkCosmicTreeLayoutStrategy& ); // Not implemented.
150  void operator = ( const vtkCosmicTreeLayoutStrategy& ); // Not implemented.
151 };
152 
153 #endif // vtkCosmicTreeLayoutStrategy_h
#define VTKINFOVISLAYOUT_EXPORT
int vtkIdType
Definition: vtkType.h:247
dynamic, self-adjusting array of double
abstract superclass for all graph layout strategies
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
tree layout strategy reminiscent of astronomical systems
RadiusMode
How are node sizes specified?
No node sizes specified... unit radius is assumed.
static vtkObject * New()
A rooted tree data structure.
Definition: vtkTree.h:59
represent and manipulate 3D points
Definition: vtkPoints.h:38
virtual void Layout()=0
void PrintSelf(ostream &os, vtkIndent indent)
Only leaf node sizes specified... parents are calculated during layout.