VTK
dox/Infovis/Layout/vtkSquarifyLayoutStrategy.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSquarifyLayoutStrategy.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 -------------------------------------------------------------------------*/
00039 #ifndef __vtkSquarifyLayoutStrategy_h
00040 #define __vtkSquarifyLayoutStrategy_h
00041 
00042 #include "vtkInfovisLayoutModule.h" // For export macro
00043 #include "vtkTreeMapLayoutStrategy.h"
00044 
00045 class vtkIdList;
00046 
00047 class VTKINFOVISLAYOUT_EXPORT vtkSquarifyLayoutStrategy : public vtkTreeMapLayoutStrategy
00048 {
00049 public:
00050   static vtkSquarifyLayoutStrategy *New();
00051   vtkTypeMacro(vtkSquarifyLayoutStrategy,vtkTreeMapLayoutStrategy);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055 
00057   void Layout(
00058       vtkTree* inputTree,
00059       vtkDataArray* coordsArray,
00060       vtkDataArray* sizeArray);
00062 
00063 protected:
00064   vtkSquarifyLayoutStrategy();
00065   ~vtkSquarifyLayoutStrategy();
00066 
00067 private:
00068 
00069   void LayoutChildren(
00070     vtkTree *tree,
00071     vtkDataArray *coordsArray,
00072     vtkDataArray *sizeArray,
00073     vtkIdType nchildren,
00074     vtkIdType parent,
00075     vtkIdType begin,
00076     float minX, float maxX,
00077     float minY, float maxY);
00078 
00079   vtkSquarifyLayoutStrategy(const vtkSquarifyLayoutStrategy&);  // Not implemented.
00080   void operator=(const vtkSquarifyLayoutStrategy&);  // Not implemented.
00081 };
00082 
00083 #endif
00084