VTK
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 -------------------------------------------------------------------------*/
36 #ifndef vtkStackedTreeLayoutStrategy_h
37 #define vtkStackedTreeLayoutStrategy_h
38 
39 #include "vtkInfovisLayoutModule.h" // For export macro
40 #include "vtkAreaLayoutStrategy.h"
41 
42 class vtkTree;
43 class vtkDataArray;
44 
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54 
57  virtual void Layout(vtkTree *inputTree, vtkDataArray *sectorArray,
58  vtkDataArray* sizeArray);
60 
62 
64  virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *sectorArray,
65  vtkDataArray* sizeArray, vtkTree *edgeRoutingTree);
67 
69 
70  vtkSetMacro(InteriorRadius, double);
71  vtkGetMacro(InteriorRadius, double);
73 
75 
76  vtkSetMacro(RingThickness, double);
77  vtkGetMacro(RingThickness, double);
79 
81 
84  vtkSetMacro(RootStartAngle, double);
85  vtkGetMacro(RootStartAngle, double);
87 
89 
92  vtkSetMacro(RootEndAngle, double);
93  vtkGetMacro(RootEndAngle, double);
95 
97 
99  vtkSetMacro(UseRectangularCoordinates, bool);
100  vtkGetMacro(UseRectangularCoordinates, bool);
101  vtkBooleanMacro(UseRectangularCoordinates, bool);
103 
105 
107  vtkSetMacro(Reverse, bool);
108  vtkGetMacro(Reverse, bool);
109  vtkBooleanMacro(Reverse, bool);
111 
113 
117  vtkSetMacro(InteriorLogSpacingValue, double);
118  vtkGetMacro(InteriorLogSpacingValue, double);
120 
123  virtual vtkIdType FindVertex(vtkTree* tree, vtkDataArray* array, float pnt[2]);
124 
125 protected:
128 
134  bool Reverse;
136 
137  void ComputeEdgeRoutingPoints(
138  vtkTree* inputTree, vtkDataArray* coordsArray, vtkTree* outputTree);
139 
140  void LayoutChildren(
141  vtkTree *tree, vtkDataArray *coordsArray, vtkDataArray *sizeArray,
142  vtkIdType nchildren, vtkIdType parent, vtkIdType begin,
143  float parentInnerRad, float parentOuterRad,
144  float parentStartAng, float parentEndAng);
145 
146 private:
148  void operator=(const vtkStackedTreeLayoutStrategy&); // Not implemented.
149 };
150 
151 #endif
virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *areaArray, vtkDataArray *sizeArray, vtkTree *edgeLayoutTree)
abstract superclass for all area layout strategies
#define VTKINFOVISLAYOUT_EXPORT
virtual void Layout(vtkTree *inputTree, vtkDataArray *areaArray, vtkDataArray *sizeArray)=0
virtual vtkIdType FindVertex(vtkTree *tree, vtkDataArray *array, float pnt[2])=0
int vtkIdType
Definition: vtkType.h:275
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
lays out tree in stacked boxes or rings
A rooted tree data structure.
Definition: vtkTree.h:59