VTK
|
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 "vtkTreeMapLayoutStrategy.h" 00043 00044 class vtkIdList; 00045 00046 class VTK_INFOVIS_EXPORT vtkSquarifyLayoutStrategy : public vtkTreeMapLayoutStrategy 00047 { 00048 public: 00049 static vtkSquarifyLayoutStrategy *New(); 00050 vtkTypeMacro(vtkSquarifyLayoutStrategy,vtkTreeMapLayoutStrategy); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00054 00056 void Layout( 00057 vtkTree* inputTree, 00058 vtkDataArray* coordsArray, 00059 vtkDataArray* sizeArray); 00061 00062 protected: 00063 vtkSquarifyLayoutStrategy(); 00064 ~vtkSquarifyLayoutStrategy(); 00065 00066 private: 00067 00068 void LayoutChildren( 00069 vtkTree *tree, 00070 vtkDataArray *coordsArray, 00071 vtkDataArray *sizeArray, 00072 vtkIdType nchildren, 00073 vtkIdType parent, 00074 vtkIdType begin, 00075 float minX, float maxX, 00076 float minY, float maxY); 00077 00078 vtkSquarifyLayoutStrategy(const vtkSquarifyLayoutStrategy&); // Not implemented. 00079 void operator=(const vtkSquarifyLayoutStrategy&); // Not implemented. 00080 }; 00081 00082 #endif 00083