VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
43 class VTKINFOVISLAYOUT_EXPORT vtkCosmicTreeLayoutStrategy : public vtkGraphLayoutStrategy
44 {
45 public:
46  static vtkCosmicTreeLayoutStrategy* New();
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 
145  vtkIdType LayoutRoot;
147 
148 private:
149  vtkCosmicTreeLayoutStrategy( const vtkCosmicTreeLayoutStrategy& ); // Not implemented.
150  void operator = ( const vtkCosmicTreeLayoutStrategy& ); // Not implemented.
151 };
152 
153 #endif // __vtkCosmicTreeLayoutStrategy_h
abstract superclass for all graph layout strategies
tree layout strategy reminiscent of astronomical systems
RadiusMode
How are node sizes specified?
No node sizes specified... unit radius is assumed.
virtual void Layout()=0
void PrintSelf(ostream &os, vtkIndent indent)
Only leaf node sizes specified... parents are calculated during layout.