VTK  9.1.0
vtkStackedTreeLayoutStrategy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkStackedTreeLayoutStrategy.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
37 #ifndef vtkStackedTreeLayoutStrategy_h
38 #define vtkStackedTreeLayoutStrategy_h
39 
40 #include "vtkAreaLayoutStrategy.h"
41 #include "vtkInfovisLayoutModule.h" // For export macro
42 
43 class vtkTree;
44 class vtkDataArray;
45 
46 class VTKINFOVISLAYOUT_EXPORT vtkStackedTreeLayoutStrategy : public vtkAreaLayoutStrategy
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
59  void Layout(vtkTree* inputTree, vtkDataArray* sectorArray, vtkDataArray* sizeArray) override;
60 
65  void LayoutEdgePoints(vtkTree* inputTree, vtkDataArray* sectorArray, vtkDataArray* sizeArray,
66  vtkTree* edgeRoutingTree) override;
67 
69 
72  vtkSetMacro(InteriorRadius, double);
73  vtkGetMacro(InteriorRadius, double);
75 
77 
80  vtkSetMacro(RingThickness, double);
81  vtkGetMacro(RingThickness, double);
83 
85 
90  vtkSetMacro(RootStartAngle, double);
91  vtkGetMacro(RootStartAngle, double);
93 
95 
100  vtkSetMacro(RootEndAngle, double);
101  vtkGetMacro(RootEndAngle, double);
103 
105 
109  vtkSetMacro(UseRectangularCoordinates, bool);
110  vtkGetMacro(UseRectangularCoordinates, bool);
111  vtkBooleanMacro(UseRectangularCoordinates, bool);
113 
115 
119  vtkSetMacro(Reverse, bool);
120  vtkGetMacro(Reverse, bool);
121  vtkBooleanMacro(Reverse, bool);
123 
125 
132  vtkSetMacro(InteriorLogSpacingValue, double);
133  vtkGetMacro(InteriorLogSpacingValue, double);
135 
139  vtkIdType FindVertex(vtkTree* tree, vtkDataArray* array, float pnt[2]) override;
140 
141 protected:
144 
150  bool Reverse;
152 
153  void ComputeEdgeRoutingPoints(vtkTree* inputTree, vtkDataArray* coordsArray, vtkTree* outputTree);
154 
155  void LayoutChildren(vtkTree* tree, vtkDataArray* coordsArray, vtkDataArray* sizeArray,
156  vtkIdType nchildren, vtkIdType parent, vtkIdType begin, float parentInnerRad,
157  float parentOuterRad, float parentStartAng, float parentEndAng);
158 
159 private:
161  void operator=(const vtkStackedTreeLayoutStrategy&) = delete;
162 };
163 
164 #endif
abstract superclass for all area layout strategies
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
a simple class to control print indentation
Definition: vtkIndent.h:34
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...
vtkIdType FindVertex(vtkTree *tree, vtkDataArray *array, float pnt[2]) override
Returns the vertex id that contains pnt (or -1 if no one contains it).
static vtkStackedTreeLayoutStrategy * New()
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:55
int vtkIdType
Definition: vtkType.h:332