VTK  9.3.1
vtkStackedTreeLayoutStrategy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
21 #ifndef vtkStackedTreeLayoutStrategy_h
22 #define vtkStackedTreeLayoutStrategy_h
23 
24 #include "vtkAreaLayoutStrategy.h"
25 #include "vtkInfovisLayoutModule.h" // For export macro
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkTree;
29 class vtkDataArray;
30 
31 class VTKINFOVISLAYOUT_EXPORT vtkStackedTreeLayoutStrategy : public vtkAreaLayoutStrategy
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
44  void Layout(vtkTree* inputTree, vtkDataArray* sectorArray, vtkDataArray* sizeArray) override;
45 
50  void LayoutEdgePoints(vtkTree* inputTree, vtkDataArray* sectorArray, vtkDataArray* sizeArray,
51  vtkTree* edgeRoutingTree) override;
52 
54 
57  vtkSetMacro(InteriorRadius, double);
58  vtkGetMacro(InteriorRadius, double);
60 
62 
65  vtkSetMacro(RingThickness, double);
66  vtkGetMacro(RingThickness, double);
68 
70 
75  vtkSetMacro(RootStartAngle, double);
76  vtkGetMacro(RootStartAngle, double);
78 
80 
85  vtkSetMacro(RootEndAngle, double);
86  vtkGetMacro(RootEndAngle, double);
88 
90 
94  vtkSetMacro(UseRectangularCoordinates, bool);
95  vtkGetMacro(UseRectangularCoordinates, bool);
96  vtkBooleanMacro(UseRectangularCoordinates, bool);
98 
100 
104  vtkSetMacro(Reverse, bool);
105  vtkGetMacro(Reverse, bool);
106  vtkBooleanMacro(Reverse, bool);
108 
110 
117  vtkSetMacro(InteriorLogSpacingValue, double);
118  vtkGetMacro(InteriorLogSpacingValue, double);
120 
124  vtkIdType FindVertex(vtkTree* tree, vtkDataArray* array, float pnt[2]) override;
125 
126 protected:
128  ~vtkStackedTreeLayoutStrategy() override;
129 
135  bool Reverse;
137 
138  void ComputeEdgeRoutingPoints(vtkTree* inputTree, vtkDataArray* coordsArray, vtkTree* outputTree);
139 
140  void LayoutChildren(vtkTree* tree, vtkDataArray* coordsArray, vtkDataArray* sizeArray,
141  vtkIdType nchildren, vtkIdType parent, vtkIdType begin, float parentInnerRad,
142  float parentOuterRad, float parentStartAng, float parentEndAng);
143 
144 private:
146  void operator=(const vtkStackedTreeLayoutStrategy&) = delete;
147 };
148 
149 VTK_ABI_NAMESPACE_END
150 #endif
abstract superclass for all area layout strategies
virtual void Layout(vtkTree *inputTree, vtkDataArray *areaArray, vtkDataArray *sizeArray)=0
Perform the layout of the input tree, and store the sector bounds of each vertex as a tuple in a data...
virtual vtkIdType FindVertex(vtkTree *tree, vtkDataArray *array, float pnt[2])=0
Returns the vertex id that contains pnt (or -1 if no one contains it)
int vtkIdType
Definition: vtkType.h:315
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *areaArray, vtkDataArray *sizeArray, vtkTree *edgeRoutingTree)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
lays out tree in stacked boxes or rings
A rooted tree data structure.
Definition: vtkTree.h:45