VTK
vtkAreaLayoutStrategy.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkAreaLayoutStrategy.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-------------------------------------------------------------------------*/
38#ifndef vtkAreaLayoutStrategy_h
39#define vtkAreaLayoutStrategy_h
40
41
42#include "vtkInfovisLayoutModule.h" // For export macro
43#include "vtkObject.h"
44
45class vtkTree;
46class vtkDataArray;
47
48class VTKINFOVISLAYOUT_EXPORT vtkAreaLayoutStrategy : public vtkObject
49{
50public:
52 void PrintSelf(ostream& os, vtkIndent indent);
53
65 virtual void Layout(vtkTree *inputTree, vtkDataArray *areaArray,
66 vtkDataArray* sizeArray) = 0;
67
68 // Modify edgeLayoutTree to have point locations appropriate
69 // for routing edges on a graph overlaid on the tree.
70 // Layout() is called before this method, so inputTree will contain the
71 // layout locations.
72 // If you do not override this method,
73 // the edgeLayoutTree vertex locations are the same as the input tree.
74 virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *areaArray,
75 vtkDataArray* sizeArray, vtkTree *edgeLayoutTree);
76
80 virtual vtkIdType FindVertex(vtkTree* tree, vtkDataArray* array, float pnt[2]) = 0;
81
82 // Descripiton:
83 // The amount that the regions are shrunk as a value from
84 // 0.0 (full size) to 1.0 (shrink to nothing).
85 vtkSetClampMacro(ShrinkPercentage, double, 0.0, 1.0);
86 vtkGetMacro(ShrinkPercentage, double);
87
88protected:
91
93
94private:
95 vtkAreaLayoutStrategy(const vtkAreaLayoutStrategy&) VTK_DELETE_FUNCTION;
96 void operator=(const vtkAreaLayoutStrategy&) VTK_DELETE_FUNCTION;
97};
98
99#endif
100
abstract superclass for all area layout strategies
virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *areaArray, vtkDataArray *sizeArray, vtkTree *edgeLayoutTree)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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)
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...
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
A rooted tree data structure.
Definition: vtkTree.h:61
int vtkIdType
Definition: vtkType.h:287