VTK
vtkCirclePackLayout.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCirclePackLayout.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  -------------------------------------------------------------------------*/
48 #ifndef vtkCirclePackLayout_h
49 #define vtkCirclePackLayout_h
50 
51 #include "vtkInfovisLayoutModule.h" // For export macro
52 #include "vtkTreeAlgorithm.h"
53 
55 class vtkDoubleArray;
56 class vtkDataArray;
57 class vtkTree;
58 
59 class VTKINFOVISLAYOUT_EXPORT vtkCirclePackLayout : public vtkTreeAlgorithm
60 {
61 public:
62  static vtkCirclePackLayout *New();
63 
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
68 
74  vtkGetStringMacro(CirclesFieldName);
75  vtkSetStringMacro(CirclesFieldName);
77 
82  virtual void SetSizeArrayName(const char* name)
84 
86 
89  vtkGetObjectMacro(LayoutStrategy, vtkCirclePackLayoutStrategy);
90  void SetLayoutStrategy(vtkCirclePackLayoutStrategy * strategy);
92 
99  vtkIdType FindVertex(double pnt[2], double *cinfo=nullptr);
100 
105  void GetBoundingCircle(vtkIdType id, double *cinfo);
106 
110  vtkMTimeType GetMTime() override;
111 
112 protected:
114  ~vtkCirclePackLayout() override;
115 
118 
120 
121 private:
122 
123  vtkCirclePackLayout(const vtkCirclePackLayout&) = delete;
124  void operator=(const vtkCirclePackLayout&) = delete;
125  void prepareSizeArray(vtkDoubleArray* mySizeArray,
126  vtkTree* tree);
127 };
128 
129 #endif
vtkCirclePackLayout::SetSizeArrayName
virtual void SetSizeArrayName(const char *name)
The array to use for the size of each vertex.
Definition: vtkCirclePackLayout.h:82
vtkCirclePackLayout::LayoutStrategy
vtkCirclePackLayoutStrategy * LayoutStrategy
Definition: vtkCirclePackLayout.h:117
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkCirclePackLayout
layout a vtkTree as a circle packing.
Definition: vtkCirclePackLayout.h:59
vtkTreeAlgorithm.h
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkCirclePackLayoutStrategy
abstract superclass for all circle packing layout strategies.
Definition: vtkCirclePackLayoutStrategy.h:52
vtkDataObject::FIELD_ASSOCIATION_VERTICES
Definition: vtkDataObject.h:263
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:60
vtkCirclePackLayout::CirclesFieldName
char * CirclesFieldName
Definition: vtkCirclePackLayout.h:116
vtkTreeAlgorithm::New
static vtkTreeAlgorithm * New()
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkTreeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTreeAlgorithm
Superclass for algorithms that produce only Tree as output.
Definition: vtkTreeAlgorithm.h:48
vtkX3D::name
Definition: vtkX3D.h:219
vtkTreeAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:41
vtkAlgorithm::SetInputArrayToProcess
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name)
Set the input data arrays that this algorithm will process.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302