VTK: Infovis/Layout/vtkAreaLayoutStrategy.h Source File

| VTK 9.3.1

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
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkTree;
30 class vtkDataArray;
31
32 class VTKINFOVISLAYOUT_EXPORT vtkAreaLayoutStrategy : public vtkObject
33 {
34 public:
35 vtkTypeMacro(vtkAreaLayoutStrategy, vtkObject);
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
71 protected:
72 vtkAreaLayoutStrategy();
73 ~vtkAreaLayoutStrategy() override;
74
75 double ShrinkPercentage;
76
77 private:
78 vtkAreaLayoutStrategy(const vtkAreaLayoutStrategy&) = delete;
79 void operator=(const vtkAreaLayoutStrategy&) = delete;
80 };
81
82 VTK_ABI_NAMESPACE_END
83 #endif
vtkAreaLayoutStrategy
abstract superclass for all area layout strategies
Definition: vtkAreaLayoutStrategy.h:33
vtkAreaLayoutStrategy::ShrinkPercentage
double ShrinkPercentage
Definition: vtkAreaLayoutStrategy.h:75
vtkAreaLayoutStrategy::LayoutEdgePoints
virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *areaArray, vtkDataArray *sizeArray, vtkTree *edgeRoutingTree)
vtkAreaLayoutStrategy::FindVertex
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)
vtkAreaLayoutStrategy::vtkAreaLayoutStrategy
vtkAreaLayoutStrategy()
vtkAreaLayoutStrategy::Layout
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...
vtkAreaLayoutStrategy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAreaLayoutStrategy::~vtkAreaLayoutStrategy
~vtkAreaLayoutStrategy() override
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:55
vtkObject.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315