00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkAreaLayoutStrategy.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 -------------------------------------------------------------------------*/ 00037 #ifndef __vtkAreaLayoutStrategy_h 00038 #define __vtkAreaLayoutStrategy_h 00039 00040 00041 #include "vtkObject.h" 00042 00043 class vtkTree; 00044 class vtkDataArray; 00045 00046 class VTK_INFOVIS_EXPORT vtkAreaLayoutStrategy : public vtkObject 00047 { 00048 public: 00049 vtkTypeMacro(vtkAreaLayoutStrategy,vtkObject); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 00058 virtual void Layout(vtkTree *inputTree, vtkDataArray *areaArray, 00059 vtkDataArray* sizeArray) = 0; 00061 00062 // Modify edgeLayoutTree to have point locations appropriate 00063 // for routing edges on a graph overlaid on the tree. 00064 // Layout() is called before this method, so inputTree will contain the 00065 // layout locations. 00066 // If you do not override this method, 00067 // the edgeLayoutTree vertex locations are the same as the input tree. 00068 virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *areaArray, 00069 vtkDataArray* sizeArray, vtkTree *edgeLayoutTree); 00070 00072 virtual vtkIdType FindVertex(vtkTree* tree, vtkDataArray* array, float pnt[2]) = 0; 00073 00074 // Descripiton: 00075 // The amount that the regions are shrunk as a value from 00076 // 0.0 (full size) to 1.0 (shrink to nothing). 00077 vtkSetClampMacro(ShrinkPercentage, double, 0.0, 1.0); 00078 vtkGetMacro(ShrinkPercentage, double); 00079 00080 protected: 00081 vtkAreaLayoutStrategy(); 00082 ~vtkAreaLayoutStrategy(); 00083 00084 double ShrinkPercentage; 00085 00086 private: 00087 vtkAreaLayoutStrategy(const vtkAreaLayoutStrategy&); // Not implemented. 00088 void operator=(const vtkAreaLayoutStrategy&); // Not implemented. 00089 }; 00090 00091 #endif 00092