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