VTK  9.4.20241221
vtkAreaLayoutStrategy.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
22#ifndef vtkAreaLayoutStrategy_h
23#define vtkAreaLayoutStrategy_h
24
25#include "vtkInfovisLayoutModule.h" // For export macro
26#include "vtkObject.h"
27
28VTK_ABI_NAMESPACE_BEGIN
29class vtkTree;
30class vtkDataArray;
31
32class VTKINFOVISLAYOUT_EXPORT vtkAreaLayoutStrategy : public vtkObject
33{
34public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
49 virtual void Layout(vtkTree* inputTree, vtkDataArray* areaArray, vtkDataArray* sizeArray) = 0;
50
51 // Modify edgeRoutingTree to have point locations appropriate
52 // for routing edges on a graph overlaid on the tree.
53 // Layout() is called before this method, so inputTree will contain the
54 // layout locations.
55 // If you do not override this method,
56 // the edgeRoutingTree vertex locations are the same as the input tree.
57 virtual void LayoutEdgePoints(
58 vtkTree* inputTree, vtkDataArray* areaArray, vtkDataArray* sizeArray, vtkTree* edgeRoutingTree);
59
63 virtual vtkIdType FindVertex(vtkTree* tree, vtkDataArray* array, float pnt[2]) = 0;
64
65 // Description:
66 // The amount that the regions are shrunk as a value from
67 // 0.0 (full size) to 1.0 (shrink to nothing).
68 vtkSetClampMacro(ShrinkPercentage, double, 0.0, 1.0);
69 vtkGetMacro(ShrinkPercentage, double);
70
71protected:
74
76
77private:
79 void operator=(const vtkAreaLayoutStrategy&) = delete;
80};
81
82VTK_ABI_NAMESPACE_END
83#endif
abstract superclass for all area layout strategies
virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *areaArray, vtkDataArray *sizeArray, vtkTree *edgeRoutingTree)
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...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkAreaLayoutStrategy() override
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
A rooted tree data structure.
Definition vtkTree.h:155
int vtkIdType
Definition vtkType.h:315