VTK  9.3.1
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 
38 VTK_ABI_NAMESPACE_BEGIN
40 class vtkDoubleArray;
41 class vtkDataArray;
42 class vtkTree;
43 
44 class VTKINFOVISLAYOUT_EXPORT vtkCirclePackLayout : public vtkTreeAlgorithm
45 {
46 public:
47  static vtkCirclePackLayout* New();
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);
77  void SetLayoutStrategy(vtkCirclePackLayoutStrategy* strategy);
79 
86  vtkIdType FindVertex(double pnt[2], double* cinfo = nullptr);
87 
92  void GetBoundingCircle(vtkIdType id, double* cinfo);
93 
97  vtkMTimeType GetMTime() override;
98 
99 protected:
101  ~vtkCirclePackLayout() override;
102 
105 
107 
108 private:
109  vtkCirclePackLayout(const vtkCirclePackLayout&) = delete;
110  void operator=(const vtkCirclePackLayout&) = delete;
111  void prepareSizeArray(vtkDoubleArray* mySizeArray, vtkTree* tree);
112 };
113 
114 VTK_ABI_NAMESPACE_END
115 #endif
Superclass for algorithms that produce only Tree as output.
Store vtkAlgorithm input/output information.
vtkCirclePackLayoutStrategy * LayoutStrategy
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
virtual void SetSizeArrayName(const char *name)
The array to use for the size of each vertex.
int vtkIdType
Definition: vtkType.h:315
dynamic, self-adjusting array of double
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name)
Set the input data arrays that this algorithm will process.
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for all circle packing layout strategies.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
virtual vtkMTimeType GetMTime()
Return this object's modified time.
layout a vtkTree as a circle packing.
Store zero or more vtkInformation instances.
static vtkTreeAlgorithm * New()
A rooted tree data structure.
Definition: vtkTree.h:45
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.