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 -------------------------------------------------------------------------*/
37 #ifndef vtkStackedTreeLayoutStrategy_h
38 #define vtkStackedTreeLayoutStrategy_h
39 
40 #include "vtkInfovisLayoutModule.h" // For export macro
41 #include "vtkAreaLayoutStrategy.h"
42 
43 class vtkTree;
44 class vtkDataArray;
45 
46 class VTKINFOVISLAYOUT_EXPORT vtkStackedTreeLayoutStrategy :
48 {
49 public:
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
60  virtual void Layout(vtkTree *inputTree, vtkDataArray *sectorArray,
61  vtkDataArray* sizeArray);
62 
67  virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *sectorArray,
68  vtkDataArray* sizeArray, vtkTree *edgeRoutingTree);
69 
71 
74  vtkSetMacro(InteriorRadius, double);
75  vtkGetMacro(InteriorRadius, double);
77 
79 
82  vtkSetMacro(RingThickness, double);
83  vtkGetMacro(RingThickness, double);
85 
87 
92  vtkSetMacro(RootStartAngle, double);
93  vtkGetMacro(RootStartAngle, double);
95 
97 
102  vtkSetMacro(RootEndAngle, double);
103  vtkGetMacro(RootEndAngle, double);
105 
107 
111  vtkSetMacro(UseRectangularCoordinates, bool);
112  vtkGetMacro(UseRectangularCoordinates, bool);
113  vtkBooleanMacro(UseRectangularCoordinates, bool);
115 
117 
121  vtkSetMacro(Reverse, bool);
122  vtkGetMacro(Reverse, bool);
123  vtkBooleanMacro(Reverse, bool);
125 
127 
134  vtkSetMacro(InteriorLogSpacingValue, double);
135  vtkGetMacro(InteriorLogSpacingValue, double);
137 
141  virtual vtkIdType FindVertex(vtkTree* tree, vtkDataArray* array, float pnt[2]);
142 
143 protected:
146 
152  bool Reverse;
154 
155  void ComputeEdgeRoutingPoints(
156  vtkTree* inputTree, vtkDataArray* coordsArray, vtkTree* outputTree);
157 
158  void LayoutChildren(
159  vtkTree *tree, vtkDataArray *coordsArray, vtkDataArray *sizeArray,
160  vtkIdType nchildren, vtkIdType parent, vtkIdType begin,
161  float parentInnerRad, float parentOuterRad,
162  float parentStartAng, float parentEndAng);
163 
164 private:
166  void operator=(const vtkStackedTreeLayoutStrategy&) VTK_DELETE_FUNCTION;
167 };
168 
169 #endif
virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *areaArray, vtkDataArray *sizeArray, vtkTree *edgeLayoutTree)
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:287
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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:60