VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSimple3DCirclesStrategy.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 =========================================================================*/ 00041 #ifndef vtkSimple3DCirclesStrategyH 00042 #define vtkSimple3DCirclesStrategyH 1 00043 00044 #include "vtkGraphLayoutStrategy.h" 00045 #include "vtkVariant.h" // For variant API 00046 00047 class vtkAbstractArray; 00048 class vtkDirectedGraph; 00049 class vtkIdTypeArray; 00050 class vtkIntArray; 00051 class vtkSimple3DCirclesStrategyInternal; 00052 00053 class VTK_INFOVIS_EXPORT vtkSimple3DCirclesStrategy : public vtkGraphLayoutStrategy 00054 { 00055 public: 00056 static vtkSimple3DCirclesStrategy * New(); 00057 vtkTypeMacro(vtkSimple3DCirclesStrategy,vtkGraphLayoutStrategy); 00058 void PrintSelf( ostream& os, vtkIndent indent ); 00059 00060 //BTX 00061 enum 00062 { 00063 FixedRadiusMethod = 0, FixedDistanceMethod = 1 00064 }; 00065 //ETX 00067 00070 vtkSetMacro(Method,int); 00071 vtkGetMacro(Method,int); 00073 00074 00077 vtkSetMacro(Radius,double); 00078 vtkGetMacro(Radius,double); 00080 00081 00084 vtkSetMacro(Height,double); 00085 vtkGetMacro(Height,double); 00087 00088 00090 vtkSetVector3Macro(Origin,double); 00091 vtkGetVector3Macro(Origin,double); 00093 00094 00097 virtual void SetDirection( double dx, double dy, double dz ); 00098 virtual void SetDirection( double d[3] ); 00099 vtkGetVector3Macro(Direction,double); 00101 00102 00108 virtual void SetMarkedStartVertices( vtkAbstractArray * _arg ); 00109 vtkGetObjectMacro(MarkedStartVertices,vtkAbstractArray); 00111 00112 00113 virtual void SetMarkedValue( vtkVariant _arg ); 00114 virtual vtkVariant GetMarkedValue( void ); 00116 00117 00121 vtkSetMacro(ForceToUseUniversalStartPointsFinder,int); 00122 vtkGetMacro(ForceToUseUniversalStartPointsFinder,int); 00123 vtkBooleanMacro(ForceToUseUniversalStartPointsFinder,int); 00125 00126 00130 vtkSetMacro(AutoHeight,int); 00131 vtkGetMacro(AutoHeight,int); 00132 vtkBooleanMacro(AutoHeight,int); 00134 00135 00136 vtkSetMacro(MinimumRadian,double); 00137 vtkGetMacro(MinimumRadian,double); 00139 00140 00142 virtual void SetMinimumDegree( double degree ); 00143 virtual double GetMinimumDegree( void ); 00145 00146 00150 virtual void SetHierarchicalLayers( vtkIntArray * _arg ); 00151 vtkGetObjectMacro(HierarchicalLayers,vtkIntArray); 00153 00154 00158 virtual void SetHierarchicalOrder( vtkIdTypeArray * _arg ); 00159 vtkGetObjectMacro(HierarchicalOrder,vtkIdTypeArray); 00161 00162 virtual void Layout( void ); 00164 00166 virtual void SetGraph( vtkGraph * graph ); 00167 protected: 00168 //BTX 00169 vtkSimple3DCirclesStrategy( void ); 00170 virtual ~vtkSimple3DCirclesStrategy( void ); 00172 00173 inline void Transform( double Local[], double Global[] ); 00174 00175 double Radius; 00176 double Height; 00177 double Origin[3]; 00178 double Direction[3]; 00179 int Method; 00180 vtkAbstractArray * MarkedStartVertices; 00181 vtkVariant MarkedValue; 00182 int ForceToUseUniversalStartPointsFinder; 00183 int AutoHeight; 00184 double MinimumRadian; 00185 00186 vtkIntArray * HierarchicalLayers; 00187 vtkIdTypeArray * HierarchicalOrder; 00188 //ETX 00189 private: 00190 //BTX 00194 virtual int UniversalStartPoints( vtkDirectedGraph * input, vtkSimple3DCirclesStrategyInternal * target, vtkSimple3DCirclesStrategyInternal *StandAlones, vtkIntArray * layers ); 00198 virtual int BuildLayers( vtkDirectedGraph * input, vtkSimple3DCirclesStrategyInternal * source, vtkIntArray * layers ); 00200 virtual void BuildPointOrder( vtkDirectedGraph * input, vtkSimple3DCirclesStrategyInternal *source, vtkSimple3DCirclesStrategyInternal *StandAlones, vtkIntArray * layers, vtkIdTypeArray * order ); 00201 00202 double T[3][3]; 00203 //ETX 00204 00205 vtkSimple3DCirclesStrategy(const vtkSimple3DCirclesStrategy&); // Not implemented. 00206 void operator=(const vtkSimple3DCirclesStrategy&); // Not implemented. 00207 }; 00208 00209 #endif