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
55class vtkDoubleArray;
56class vtkDataArray;
57class vtkTree;
58
59class VTKINFOVISLAYOUT_EXPORT vtkCirclePackLayout : public vtkTreeAlgorithm
60{
61public:
63
65 void PrintSelf(ostream& os, vtkIndent indent);
66
68
74 vtkGetStringMacro(CirclesFieldName);
75 vtkSetStringMacro(CirclesFieldName);
77
82 virtual void SetSizeArrayName(const char* name)
84
86
89 vtkGetObjectMacro(LayoutStrategy, vtkCirclePackLayoutStrategy);
92
99 vtkIdType FindVertex(double pnt[2], double *cinfo=0);
100
105 void GetBoundingCircle(vtkIdType id, double *cinfo);
106
111
112protected:
115
118
120
121private:
122
123 vtkCirclePackLayout(const vtkCirclePackLayout&) VTK_DELETE_FUNCTION;
124 void operator=(const vtkCirclePackLayout&) VTK_DELETE_FUNCTION;
125 void prepareSizeArray(vtkDoubleArray* mySizeArray,
126 vtkTree* tree);
127};
128
129#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.
virtual vtkMTimeType GetMTime()
Get the modification time of the layout algorithm.
void GetBoundingCircle(vtkIdType id, double *cinfo)
Return the Xcenter, Ycenter, and Radius of the vertex's bounding circle.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
virtual void SetSizeArrayName(const char *name)
The array to use for the size of each vertex.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkCirclePackLayoutStrategy * LayoutStrategy
vtkIdType FindVertex(double pnt[2], double *cinfo=0)
Returns the vertex id that contains pnt (or -1 if no one contains it) pnt[0] is x,...
void SetLayoutStrategy(vtkCirclePackLayoutStrategy *strategy)
static vtkCirclePackLayout * New()
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
@ FIELD_ASSOCIATION_VERTICES
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:40
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:61
@ name
Definition: vtkX3D.h:219
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248