VTK
dox/Infovis/vtkCirclePackLayout.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003  Program:   Visualization Toolkit
00004  Module:    vtkCirclePackLayout.h
00005 
00006  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007  All rights reserved.
00008  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010  This software is distributed WITHOUT ANY WARRANTY; without even
00011  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012  PURPOSE.  See the above copyright notice for more information.
00013 
00014  =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016  Copyright 2008 Sandia Corporation.
00017  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018  the U.S. Government retains certain rights in this software.
00019  -------------------------------------------------------------------------*/
00044 #ifndef __vtkCirclePackLayout_h
00045 #define __vtkCirclePackLayout_h
00046 
00047 #include "vtkTreeAlgorithm.h"
00048 
00049 class vtkCirclePackLayoutStrategy;
00050 
00051 class VTK_INFOVIS_EXPORT vtkCirclePackLayout : public vtkTreeAlgorithm
00052 {
00053 public:
00054     static vtkCirclePackLayout *New();
00055 
00056     vtkTypeMacro(vtkCirclePackLayout,vtkTreeAlgorithm);
00057     void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00063     vtkGetStringMacro(CirclesFieldName);
00064     vtkSetStringMacro(CirclesFieldName);
00066 
00068 
00070     virtual void SetSizeArrayName(const char* name)
00071     { this->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_VERTICES, name); }
00073 
00075 
00076     vtkGetObjectMacro(LayoutStrategy, vtkCirclePackLayoutStrategy);
00077     void SetLayoutStrategy(vtkCirclePackLayoutStrategy * strategy);
00079 
00084     vtkIdType FindVertex(float pnt[2], float *cinfo=0);
00085 
00088     void GetBoundingCircle(vtkIdType id, float *cinfo);
00089 
00091     virtual unsigned long GetMTime();
00092 
00093 protected:
00094     vtkCirclePackLayout();
00095     ~vtkCirclePackLayout();
00096 
00097     char * CirclesFieldName;
00098     vtkCirclePackLayoutStrategy* LayoutStrategy;
00099 
00100     int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00101 
00102 private:
00103 
00104     vtkCirclePackLayout(const vtkCirclePackLayout&);  // Not implemented.
00105     void operator=(const vtkCirclePackLayout&);  // Not implemented.
00106 };
00107 
00108 #endif