00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00036 #ifndef __vtkStackedTreeLayoutStrategy_h
00037 #define __vtkStackedTreeLayoutStrategy_h
00038
00039 #include "vtkAreaLayoutStrategy.h"
00040
00041 class vtkTree;
00042 class vtkDataArray;
00043
00044 class VTK_INFOVIS_EXPORT vtkStackedTreeLayoutStrategy :
00045 public vtkAreaLayoutStrategy
00046 {
00047 public:
00048 static vtkStackedTreeLayoutStrategy* New();
00049 vtkTypeMacro(vtkStackedTreeLayoutStrategy,vtkAreaLayoutStrategy);
00050 void PrintSelf(ostream& os, vtkIndent indent);
00051
00053
00056 virtual void Layout(vtkTree *inputTree, vtkDataArray *sectorArray,
00057 vtkDataArray* sizeArray);
00059
00061
00063 virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *sectorArray,
00064 vtkDataArray* sizeArray, vtkTree *edgeRoutingTree);
00066
00068
00069 vtkSetMacro(InteriorRadius, double);
00070 vtkGetMacro(InteriorRadius, double);
00072
00074
00075 vtkSetMacro(RingThickness, double);
00076 vtkGetMacro(RingThickness, double);
00078
00080
00083 vtkSetMacro(RootStartAngle, double);
00084 vtkGetMacro(RootStartAngle, double);
00086
00088
00091 vtkSetMacro(RootEndAngle, double);
00092 vtkGetMacro(RootEndAngle, double);
00094
00096
00098 vtkSetMacro(UseRectangularCoordinates, bool);
00099 vtkGetMacro(UseRectangularCoordinates, bool);
00100 vtkBooleanMacro(UseRectangularCoordinates, bool);
00102
00104
00106 vtkSetMacro(Reverse, bool);
00107 vtkGetMacro(Reverse, bool);
00108 vtkBooleanMacro(Reverse, bool);
00110
00112
00116 vtkSetMacro(InteriorLogSpacingValue, double);
00117 vtkGetMacro(InteriorLogSpacingValue, double);
00119
00122 virtual vtkIdType FindVertex(vtkTree* tree, vtkDataArray* array, float pnt[2]);
00123
00124 protected:
00125 vtkStackedTreeLayoutStrategy();
00126 ~vtkStackedTreeLayoutStrategy();
00127
00128 float InteriorRadius;
00129 float RingThickness;
00130 float RootStartAngle;
00131 float RootEndAngle;
00132 bool UseRectangularCoordinates;
00133 bool Reverse;
00134 double InteriorLogSpacingValue;
00135
00136 void ComputeEdgeRoutingPoints(
00137 vtkTree* inputTree, vtkDataArray* coordsArray, vtkTree* outputTree);
00138
00139 void LayoutChildren(
00140 vtkTree *tree, vtkDataArray *coordsArray, vtkDataArray *sizeArray,
00141 vtkIdType nchildren, vtkIdType parent, vtkIdType begin,
00142 float parentInnerRad, float parentOuterRad,
00143 float parentStartAng, float parentEndAng);
00144
00145 private:
00146 vtkStackedTreeLayoutStrategy(const vtkStackedTreeLayoutStrategy&);
00147 void operator=(const vtkStackedTreeLayoutStrategy&);
00148 };
00149
00150 #endif