VTK  9.3.20240423
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
25#include "vtkInfovisLayoutModule.h" // For export macro
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkTree;
29class vtkDataArray;
30
31class VTKINFOVISLAYOUT_EXPORT vtkStackedTreeLayoutStrategy : public vtkAreaLayoutStrategy
32{
33public:
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
126protected:
129
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
144private:
146 void operator=(const vtkStackedTreeLayoutStrategy&) = delete;
147};
148
149VTK_ABI_NAMESPACE_END
150#endif
abstract superclass for all area layout strategies
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:108
lays out tree in stacked boxes or rings
void ComputeEdgeRoutingPoints(vtkTree *inputTree, vtkDataArray *coordsArray, vtkTree *outputTree)
void LayoutChildren(vtkTree *tree, vtkDataArray *coordsArray, vtkDataArray *sizeArray, vtkIdType nchildren, vtkIdType parent, vtkIdType begin, float parentInnerRad, float parentOuterRad, float parentStartAng, float parentEndAng)
void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *sectorArray, vtkDataArray *sizeArray, vtkTree *edgeRoutingTree) override
Fill edgeRoutingTree with points suitable for routing edges of an overlaid graph.
void Layout(vtkTree *inputTree, vtkDataArray *sectorArray, vtkDataArray *sizeArray) override
Perform the layout of the input tree, and store the sector bounds of each vertex as a tuple (innerRad...
static vtkStackedTreeLayoutStrategy * New()
vtkIdType FindVertex(vtkTree *tree, vtkDataArray *array, float pnt[2]) override
Returns the vertex id that contains pnt (or -1 if no one contains it).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkStackedTreeLayoutStrategy() override
A rooted tree data structure.
Definition vtkTree.h:145
int vtkIdType
Definition vtkType.h:315