VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Infovis/Layout/vtkConeLayoutStrategy.h
Go to the documentation of this file.
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 "vtkInfovisLayoutModule.h" // For export macro
00052 #include "vtkGraphLayoutStrategy.h"
00053 
00054 class vtkPoints;
00055 
00056 class VTKINFOVISLAYOUT_EXPORT vtkConeLayoutStrategy : public vtkGraphLayoutStrategy
00057 {
00058 public:
00059   static vtkConeLayoutStrategy *New();
00060 
00061   vtkTypeMacro(vtkConeLayoutStrategy, vtkGraphLayoutStrategy);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063 
00065 
00069   vtkSetMacro(Compactness, float);
00070   vtkGetMacro(Compactness, float);
00072 
00074 
00078   vtkSetMacro(Compression, int);
00079   vtkGetMacro(Compression, int);
00080   vtkBooleanMacro(Compression, int);
00082 
00084 
00088   vtkSetMacro(Spacing, float);
00089   vtkGetMacro(Spacing, float);
00091 
00092 
00094   void Layout();
00095 
00096 protected:
00097   vtkConeLayoutStrategy();
00098   ~vtkConeLayoutStrategy();
00099 
00106   double LocalPlacement(vtkIdType root, vtkPoints *points);
00107 
00108   void GlobalPlacement(
00109     vtkIdType root,
00110     vtkPoints *points,
00111     double refX,         // absolute x-y coordinate of
00112     double refY,         // parent node; z coordinate
00113     double level );      // derived from level.
00114 
00115   float Compactness;     // factor used in mapping layer to Z
00116   int   Compression;     // force a compact layout?
00117   float Spacing;         // Scale vertical spacing of cones.
00118 
00119   // Values accumulated for possible statistical use
00120   double MinRadius;
00121   double MaxRadius;
00122   int   NrCones;
00123   double SumOfRadii;
00124 
00125 private:
00126   vtkConeLayoutStrategy(const vtkConeLayoutStrategy&);  // Not implemented.
00127   void operator=(const vtkConeLayoutStrategy&);  // Not implemented.
00128 };
00129 
00130 #endif
00131