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 "vtkGraphLayoutStrategy.h"
36 
37 class vtkDoubleArray;
38 class vtkDataArray;
39 class vtkPoints;
40 class vtkTree;
41 
43 {
44 public:
46  virtual void PrintSelf( ostream& os, vtkIndent indent );
48 
50  virtual void Layout();
51 
53 
58  vtkSetMacro(SizeLeafNodesOnly,int);
59  vtkGetMacro(SizeLeafNodesOnly,int);
60  vtkBooleanMacro(SizeLeafNodesOnly,int);
62 
64 
69  vtkSetMacro(LayoutDepth,int);
70  vtkGetMacro(LayoutDepth,int);
72 
74 
80  vtkSetMacro(LayoutRoot,vtkIdType);
81  vtkGetMacro(LayoutRoot,vtkIdType);
83 
85 
88  vtkSetStringMacro(NodeSizeArrayName);
89  vtkGetStringMacro(NodeSizeArrayName);
91 
92 protected:
93 
94  //BTX
97  {
98  NONE,
100  ALL
101  };
102  //ETX
103 
105  virtual ~vtkCosmicTreeLayoutStrategy();
106 
107  //BTX
109 
110  void LayoutChildren(
111  vtkTree* tree, vtkPoints* newPoints, vtkDoubleArray* radii, vtkDoubleArray* scale,
112  vtkIdType root, int depth, RadiusMode mode );
114 
116 
120  void OffsetChildren(
121  vtkTree* tree, vtkPoints* pts, vtkDoubleArray* radii, vtkDoubleArray* scale,
122  double parent[4], vtkIdType root, int depth, RadiusMode mode );
123  //ETX
125 
134  vtkDoubleArray* CreateRadii( vtkIdType numVertices, double initialValue, vtkDataArray* inputRadii );
135 
140  vtkDoubleArray* CreateScaleFactors( vtkIdType numVertices );
141 
146 
147 private:
148  vtkCosmicTreeLayoutStrategy( const vtkCosmicTreeLayoutStrategy& ); // Not implemented.
149  void operator = ( const vtkCosmicTreeLayoutStrategy& ); // Not implemented.
150 };
151 
152 #endif // __vtkCosmicTreeLayoutStrategy_h
int vtkIdType
Definition: vtkType.h:255
dynamic, self-adjusting array of double
abstract superclass for all graph layout strategies
a simple class to control print indentation
Definition: vtkIndent.h:37
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
tree layout strategy reminiscent of astronomical systems
RadiusMode
How are node sizes specified?
No node sizes specified... unit radius is assumed.
#define VTK_INFOVIS_EXPORT
static vtkObject * New()
A rooted tree data structure.
Definition: vtkTree.h:58
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.