VTK
dox/Infovis/vtkGraphLayout.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGraphLayout.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 __vtkGraphLayout_h
00040 #define __vtkGraphLayout_h
00041 
00042 #include "vtkGraphAlgorithm.h"
00043 
00044 class vtkAbstractTransform;
00045 class vtkEventForwarderCommand;
00046 class vtkGraphLayoutStrategy;
00047 
00048 class VTK_INFOVIS_EXPORT vtkGraphLayout : public vtkGraphAlgorithm 
00049 {
00050 public:
00051   static vtkGraphLayout *New();
00052   vtkTypeMacro(vtkGraphLayout, vtkGraphAlgorithm);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056 
00057   void SetLayoutStrategy(vtkGraphLayoutStrategy *strategy);
00058   vtkGetObjectMacro(LayoutStrategy, vtkGraphLayoutStrategy);
00060   
00062   virtual int IsLayoutComplete();
00063 
00065   virtual unsigned long GetMTime();
00066 
00068 
00071   vtkGetMacro(ZRange, double);
00072   vtkSetMacro(ZRange, double);
00074 
00076 
00077   vtkGetObjectMacro(Transform, vtkAbstractTransform);
00078   virtual void SetTransform(vtkAbstractTransform* t);
00080 
00082 
00083   vtkSetMacro(UseTransform, bool);
00084   vtkGetMacro(UseTransform, bool);
00085   vtkBooleanMacro(UseTransform, bool);
00087 
00088 protected:
00089   vtkGraphLayout();
00090   ~vtkGraphLayout();
00091 
00092   vtkGraphLayoutStrategy* LayoutStrategy;
00093 
00096   vtkEventForwarderCommand *EventForwarder;
00097 
00098   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00099   
00100 private:
00101 
00102   vtkGraph* LastInput;
00103   vtkGraph* InternalGraph;
00104   unsigned long LastInputMTime;
00105   bool StrategyChanged;
00106   double ZRange;
00107   vtkAbstractTransform* Transform;
00108   bool UseTransform;
00109 
00110   vtkGraphLayout(const vtkGraphLayout&);  // Not implemented.
00111   void operator=(const vtkGraphLayout&);  // Not implemented.
00112 };
00113 
00114 #endif