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----------------------------------------------------------------------------*/
33#ifndef vtkCosmicTreeLayoutStrategy_h
34#define vtkCosmicTreeLayoutStrategy_h
35
36#include "vtkInfovisLayoutModule.h" // For export macro
38
39class vtkDoubleArray;
40class vtkDataArray;
41class vtkPoints;
42class vtkTree;
43
44class VTKINFOVISLAYOUT_EXPORT vtkCosmicTreeLayoutStrategy : public vtkGraphLayoutStrategy
45{
46public:
48 virtual void PrintSelf( ostream& os, vtkIndent indent );
50
54 virtual void Layout();
55
57
65 vtkSetMacro(SizeLeafNodesOnly,int);
66 vtkGetMacro(SizeLeafNodesOnly,int);
67 vtkBooleanMacro(SizeLeafNodesOnly,int);
69
71
79 vtkSetMacro(LayoutDepth,int);
80 vtkGetMacro(LayoutDepth,int);
82
84
94 vtkGetMacro(LayoutRoot,vtkIdType);
96
98
104 vtkSetStringMacro(NodeSizeArrayName);
105 vtkGetStringMacro(NodeSizeArrayName);
107
108protected:
109
112 {
115 ALL
116 };
117
120
125 vtkTree* tree, vtkPoints* newPoints, vtkDoubleArray* radii, vtkDoubleArray* scale,
126 vtkIdType root, int depth, RadiusMode mode );
127
136 double parent[4], vtkIdType root, int depth, RadiusMode mode );
137
146 vtkDoubleArray* CreateRadii( vtkIdType numVertices, double initialValue, vtkDataArray* inputRadii );
147
155
160
161private:
162 vtkCosmicTreeLayoutStrategy( const vtkCosmicTreeLayoutStrategy& ) VTK_DELETE_FUNCTION;
163 void operator = ( const vtkCosmicTreeLayoutStrategy& ) VTK_DELETE_FUNCTION;
164};
165
166#endif // vtkCosmicTreeLayoutStrategy_h
tree layout strategy reminiscent of astronomical systems
RadiusMode
How are node sizes specified?
@ NONE
No node sizes specified... unit radius is assumed.
@ LEAVES
Only leaf node sizes specified... parents are calculated during layout.
virtual ~vtkCosmicTreeLayoutStrategy()
static vtkCosmicTreeLayoutStrategy * New()
vtkDoubleArray * CreateRadii(vtkIdType numVertices, double initialValue, vtkDataArray *inputRadii)
Create an array to hold radii, named appropriately (depends on NodeSizeArrayName) and initialized to ...
virtual void Layout()
Perform the layout.
vtkDoubleArray * CreateScaleFactors(vtkIdType numVertices)
Create an array to hold scale factors, named appropriately (depends on NodeSizeArrayName) and initial...
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void OffsetChildren(vtkTree *tree, vtkPoints *pts, vtkDoubleArray *radii, vtkDoubleArray *scale, double parent[4], vtkIdType root, int depth, RadiusMode mode)
Recursive routine that adds each parent node's (x,y) position to its children.
void LayoutChildren(vtkTree *tree, vtkPoints *newPoints, vtkDoubleArray *radii, vtkDoubleArray *scale, vtkIdType root, int depth, RadiusMode mode)
Recursive routine used to lay out tree nodes.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
dynamic, self-adjusting array of double
abstract superclass for all graph layout strategies
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 3D points
Definition: vtkPoints.h:40
A rooted tree data structure.
Definition: vtkTree.h:61
@ mode
Definition: vtkX3D.h:247
@ scale
Definition: vtkX3D.h:229
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int vtkIdType
Definition: vtkType.h:287