VTK
|
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 "vtkInfovisLayoutModule.h" // For export macro 00043 #include "vtkGraphAlgorithm.h" 00044 00045 class vtkAbstractTransform; 00046 class vtkEventForwarderCommand; 00047 class vtkGraphLayoutStrategy; 00048 00049 class VTKINFOVISLAYOUT_EXPORT vtkGraphLayout : public vtkGraphAlgorithm 00050 { 00051 public: 00052 static vtkGraphLayout *New(); 00053 vtkTypeMacro(vtkGraphLayout, vtkGraphAlgorithm); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 00057 00058 void SetLayoutStrategy(vtkGraphLayoutStrategy *strategy); 00059 vtkGetObjectMacro(LayoutStrategy, vtkGraphLayoutStrategy); 00061 00063 virtual int IsLayoutComplete(); 00064 00066 virtual unsigned long GetMTime(); 00067 00069 00072 vtkGetMacro(ZRange, double); 00073 vtkSetMacro(ZRange, double); 00075 00077 00078 vtkGetObjectMacro(Transform, vtkAbstractTransform); 00079 virtual void SetTransform(vtkAbstractTransform* t); 00081 00083 00084 vtkSetMacro(UseTransform, bool); 00085 vtkGetMacro(UseTransform, bool); 00086 vtkBooleanMacro(UseTransform, bool); 00088 00089 protected: 00090 vtkGraphLayout(); 00091 ~vtkGraphLayout(); 00092 00093 vtkGraphLayoutStrategy* LayoutStrategy; 00094 00097 vtkEventForwarderCommand *EventForwarder; 00098 00099 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00100 00101 private: 00102 00103 vtkGraph* LastInput; 00104 vtkGraph* InternalGraph; 00105 unsigned long LastInputMTime; 00106 bool StrategyChanged; 00107 double ZRange; 00108 vtkAbstractTransform* Transform; 00109 bool UseTransform; 00110 00111 vtkGraphLayout(const vtkGraphLayout&); // Not implemented. 00112 void operator=(const vtkGraphLayout&); // Not implemented. 00113 }; 00114 00115 #endif