VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkConeLayoutStrategy.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 //------------------------------------------------------------------------- 00020 00048 #ifndef __vtkConeLayoutStrategy_h 00049 #define __vtkConeLayoutStrategy_h 00050 00051 #include "vtkGraphLayoutStrategy.h" 00052 00053 class vtkPoints; 00054 00055 class VTK_INFOVIS_EXPORT vtkConeLayoutStrategy : public vtkGraphLayoutStrategy 00056 { 00057 public: 00058 static vtkConeLayoutStrategy *New(); 00059 00060 vtkTypeMacro(vtkConeLayoutStrategy, vtkGraphLayoutStrategy); 00061 void PrintSelf(ostream& os, vtkIndent indent); 00062 00064 00068 vtkSetMacro(Compactness, float); 00069 vtkGetMacro(Compactness, float); 00071 00073 00077 vtkSetMacro(Compression, int); 00078 vtkGetMacro(Compression, int); 00079 vtkBooleanMacro(Compression, int); 00081 00083 00087 vtkSetMacro(Spacing, float); 00088 vtkGetMacro(Spacing, float); 00090 00091 00093 void Layout(); 00094 00095 protected: 00096 vtkConeLayoutStrategy(); 00097 ~vtkConeLayoutStrategy(); 00098 00105 double LocalPlacement(vtkIdType root, vtkPoints *points); 00106 00107 void GlobalPlacement( 00108 vtkIdType root, 00109 vtkPoints *points, 00110 double refX, // absolute x-y coordinate of 00111 double refY, // parent node; z coordinate 00112 double level ); // derived from level. 00113 00114 float Compactness; // factor used in mapping layer to Z 00115 int Compression; // force a compact layout? 00116 float Spacing; // Scale vertical spacing of cones. 00117 00118 // Values accumulated for possible statistical use 00119 double MinRadius; 00120 double MaxRadius; 00121 int NrCones; 00122 double SumOfRadii; 00123 00124 private: 00125 vtkConeLayoutStrategy(const vtkConeLayoutStrategy&); // Not implemented. 00126 void operator=(const vtkConeLayoutStrategy&); // Not implemented. 00127 }; 00128 00129 #endif 00130