VTK  9.3.20240420
vtkCirclePackLayout.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
32#ifndef vtkCirclePackLayout_h
33#define vtkCirclePackLayout_h
34
35#include "vtkInfovisLayoutModule.h" // For export macro
36#include "vtkTreeAlgorithm.h"
37
38VTK_ABI_NAMESPACE_BEGIN
40class vtkDoubleArray;
41class vtkDataArray;
42class vtkTree;
43
44class VTKINFOVISLAYOUT_EXPORT vtkCirclePackLayout : public vtkTreeAlgorithm
45{
46public:
48
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
53
59 vtkGetStringMacro(CirclesFieldName);
60 vtkSetStringMacro(CirclesFieldName);
62
67 virtual void SetSizeArrayName(const char* name)
68 {
70 }
71
73
76 vtkGetObjectMacro(LayoutStrategy, vtkCirclePackLayoutStrategy);
79
86 vtkIdType FindVertex(double pnt[2], double* cinfo = nullptr);
87
92 void GetBoundingCircle(vtkIdType id, double* cinfo);
93
98
99protected:
102
105
107
108private:
110 void operator=(const vtkCirclePackLayout&) = delete;
111 void prepareSizeArray(vtkDoubleArray* mySizeArray, vtkTree* tree);
112};
113
114VTK_ABI_NAMESPACE_END
115#endif
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name)
Set the input data arrays that this algorithm will process.
abstract superclass for all circle packing layout strategies.
layout a vtkTree as a circle packing.
void GetBoundingCircle(vtkIdType id, double *cinfo)
Return the Xcenter, Ycenter, and Radius of the vertex's bounding circle.
virtual void SetSizeArrayName(const char *name)
The array to use for the size of each vertex.
vtkIdType FindVertex(double pnt[2], double *cinfo=nullptr)
Returns the vertex id that contains pnt (or -1 if no one contains it) pnt[0] is x,...
vtkCirclePackLayoutStrategy * LayoutStrategy
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetLayoutStrategy(vtkCirclePackLayoutStrategy *strategy)
The strategy to use when laying out the tree map.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkCirclePackLayout() override
vtkMTimeType GetMTime() override
Get the modification time of the layout algorithm.
static vtkCirclePackLayout * New()
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only Tree as output.
A rooted tree data structure.
Definition vtkTree.h:145
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270