VTK  9.3.20240328
vtkConeLayoutStrategy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
32 #ifndef vtkConeLayoutStrategy_h
33 #define vtkConeLayoutStrategy_h
34 
35 #include "vtkGraphLayoutStrategy.h"
36 #include "vtkInfovisLayoutModule.h" // For export macro
37 
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkPoints;
40 
41 class VTKINFOVISLAYOUT_EXPORT vtkConeLayoutStrategy : public vtkGraphLayoutStrategy
42 {
43 public:
45 
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
57  vtkSetMacro(Compactness, float);
58  vtkGetMacro(Compactness, float);
60 
62 
69  vtkSetMacro(Compression, vtkTypeBool);
70  vtkGetMacro(Compression, vtkTypeBool);
71  vtkBooleanMacro(Compression, vtkTypeBool);
73 
75 
82  vtkSetMacro(Spacing, float);
83  vtkGetMacro(Spacing, float);
85 
89  void Layout() override;
90 
91 protected:
94 
104 
106  double refX, // absolute x-y coordinate of
107  double refY, // parent node; z coordinate
108  double level); // derived from level.
109 
110  float Compactness; // factor used in mapping layer to Z
111  vtkTypeBool Compression; // force a compact layout?
112  float Spacing; // Scale vertical spacing of cones.
113 
114  // Values accumulated for possible statistical use
115  double MinRadius;
116  double MaxRadius;
117  int NrCones;
118  double SumOfRadii;
119 
120 private:
122  void operator=(const vtkConeLayoutStrategy&) = delete;
123 };
124 
125 VTK_ABI_NAMESPACE_END
126 #endif
produce a cone-tree layout for a forest
static vtkConeLayoutStrategy * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Layout() override
Perform the layout.
double LocalPlacement(vtkIdType root, vtkPoints *points)
Helper operations for tree layout.
~vtkConeLayoutStrategy() override
void GlobalPlacement(vtkIdType root, vtkPoints *points, double refX, double refY, double level)
abstract superclass for all graph layout strategies
a simple class to control print indentation
Definition: vtkIndent.h:108
represent and manipulate 3D points
Definition: vtkPoints.h:138
@ points
Definition: vtkX3D.h:446
@ level
Definition: vtkX3D.h:395
int vtkTypeBool
Definition: vtkABI.h:64
int vtkIdType
Definition: vtkType.h:315