VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkStackedTreeLayoutStrategy.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 -------------------------------------------------------------------------*/ 00036 #ifndef __vtkStackedTreeLayoutStrategy_h 00037 #define __vtkStackedTreeLayoutStrategy_h 00038 00039 #include "vtkInfovisLayoutModule.h" // For export macro 00040 #include "vtkAreaLayoutStrategy.h" 00041 00042 class vtkTree; 00043 class vtkDataArray; 00044 00045 class VTKINFOVISLAYOUT_EXPORT vtkStackedTreeLayoutStrategy : 00046 public vtkAreaLayoutStrategy 00047 { 00048 public: 00049 static vtkStackedTreeLayoutStrategy* New(); 00050 vtkTypeMacro(vtkStackedTreeLayoutStrategy,vtkAreaLayoutStrategy); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00054 00057 virtual void Layout(vtkTree *inputTree, vtkDataArray *sectorArray, 00058 vtkDataArray* sizeArray); 00060 00062 00064 virtual void LayoutEdgePoints(vtkTree *inputTree, vtkDataArray *sectorArray, 00065 vtkDataArray* sizeArray, vtkTree *edgeRoutingTree); 00067 00069 00070 vtkSetMacro(InteriorRadius, double); 00071 vtkGetMacro(InteriorRadius, double); 00073 00075 00076 vtkSetMacro(RingThickness, double); 00077 vtkGetMacro(RingThickness, double); 00079 00081 00084 vtkSetMacro(RootStartAngle, double); 00085 vtkGetMacro(RootStartAngle, double); 00087 00089 00092 vtkSetMacro(RootEndAngle, double); 00093 vtkGetMacro(RootEndAngle, double); 00095 00097 00099 vtkSetMacro(UseRectangularCoordinates, bool); 00100 vtkGetMacro(UseRectangularCoordinates, bool); 00101 vtkBooleanMacro(UseRectangularCoordinates, bool); 00103 00105 00107 vtkSetMacro(Reverse, bool); 00108 vtkGetMacro(Reverse, bool); 00109 vtkBooleanMacro(Reverse, bool); 00111 00113 00117 vtkSetMacro(InteriorLogSpacingValue, double); 00118 vtkGetMacro(InteriorLogSpacingValue, double); 00120 00123 virtual vtkIdType FindVertex(vtkTree* tree, vtkDataArray* array, float pnt[2]); 00124 00125 protected: 00126 vtkStackedTreeLayoutStrategy(); 00127 ~vtkStackedTreeLayoutStrategy(); 00128 00129 float InteriorRadius; 00130 float RingThickness; 00131 float RootStartAngle; 00132 float RootEndAngle; 00133 bool UseRectangularCoordinates; 00134 bool Reverse; 00135 double InteriorLogSpacingValue; 00136 00137 void ComputeEdgeRoutingPoints( 00138 vtkTree* inputTree, vtkDataArray* coordsArray, vtkTree* outputTree); 00139 00140 void LayoutChildren( 00141 vtkTree *tree, vtkDataArray *coordsArray, vtkDataArray *sizeArray, 00142 vtkIdType nchildren, vtkIdType parent, vtkIdType begin, 00143 float parentInnerRad, float parentOuterRad, 00144 float parentStartAng, float parentEndAng); 00145 00146 private: 00147 vtkStackedTreeLayoutStrategy(const vtkStackedTreeLayoutStrategy&); // Not implemented. 00148 void operator=(const vtkStackedTreeLayoutStrategy&); // Not implemented. 00149 }; 00150 00151 #endif