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
37 #include "vtkGraphLayoutStrategy.h"
38 
39 class vtkDoubleArray;
40 class vtkDataArray;
41 class vtkPoints;
42 class vtkTree;
43 
44 class VTKINFOVISLAYOUT_EXPORT vtkCosmicTreeLayoutStrategy : public vtkGraphLayoutStrategy
45 {
46 public:
48  void PrintSelf( ostream& os, vtkIndent indent ) override;
50 
54  void Layout() override;
55 
57 
65  vtkSetMacro(SizeLeafNodesOnly,vtkTypeBool);
66  vtkGetMacro(SizeLeafNodesOnly,vtkTypeBool);
67  vtkBooleanMacro(SizeLeafNodesOnly,vtkTypeBool);
69 
71 
79  vtkSetMacro(LayoutDepth,int);
80  vtkGetMacro(LayoutDepth,int);
82 
84 
93  vtkSetMacro(LayoutRoot,vtkIdType);
94  vtkGetMacro(LayoutRoot,vtkIdType);
96 
98 
104  vtkSetStringMacro(NodeSizeArrayName);
105  vtkGetStringMacro(NodeSizeArrayName);
107 
108 protected:
109 
112  {
115  ALL
116  };
117 
119  ~vtkCosmicTreeLayoutStrategy() override;
120 
124  void LayoutChildren(
125  vtkTree* tree, vtkPoints* newPoints, vtkDoubleArray* radii, vtkDoubleArray* scale,
126  vtkIdType root, int depth, RadiusMode mode );
127 
134  void OffsetChildren(
135  vtkTree* tree, vtkPoints* pts, vtkDoubleArray* radii, vtkDoubleArray* scale,
136  double parent[4], vtkIdType root, int depth, RadiusMode mode );
137 
146  vtkDoubleArray* CreateRadii( vtkIdType numVertices, double initialValue, vtkDataArray* inputRadii );
147 
154  vtkDoubleArray* CreateScaleFactors( vtkIdType numVertices );
155 
160 
161 private:
163  void operator = ( const vtkCosmicTreeLayoutStrategy& ) = delete;
164 };
165 
166 #endif // vtkCosmicTreeLayoutStrategy_h
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkCosmicTreeLayoutStrategy::LayoutRoot
vtkIdType LayoutRoot
Definition: vtkCosmicTreeLayoutStrategy.h:158
vtkX3D::scale
Definition: vtkX3D.h:229
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkGraphLayoutStrategy
abstract superclass for all graph layout strategies
Definition: vtkGraphLayoutStrategy.h:45
vtkCosmicTreeLayoutStrategy::LayoutDepth
int LayoutDepth
Definition: vtkCosmicTreeLayoutStrategy.h:157
vtkCosmicTreeLayoutStrategy::NONE
No node sizes specified... unit radius is assumed.
Definition: vtkCosmicTreeLayoutStrategy.h:113
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkGraphLayoutStrategy::Layout
virtual void Layout()=0
This is the layout method where the graph that was set in SetGraph() is laid out.
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:60
vtkCosmicTreeLayoutStrategy::LEAVES
Only leaf node sizes specified... parents are calculated during layout.
Definition: vtkCosmicTreeLayoutStrategy.h:114
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCosmicTreeLayoutStrategy
tree layout strategy reminiscent of astronomical systems
Definition: vtkCosmicTreeLayoutStrategy.h:44
vtkGraphLayoutStrategy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCosmicTreeLayoutStrategy::NodeSizeArrayName
char * NodeSizeArrayName
Definition: vtkCosmicTreeLayoutStrategy.h:159
vtkGraphLayoutStrategy.h
vtkCosmicTreeLayoutStrategy::SizeLeafNodesOnly
vtkTypeBool SizeLeafNodesOnly
Definition: vtkCosmicTreeLayoutStrategy.h:156
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:41
vtkX3D::mode
Definition: vtkX3D.h:247
vtkCosmicTreeLayoutStrategy::RadiusMode
RadiusMode
How are node sizes specified?
Definition: vtkCosmicTreeLayoutStrategy.h:111
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69