VTK  9.3.1
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:
44  static vtkConeLayoutStrategy* New();
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:
93  ~vtkConeLayoutStrategy() override;
94 
103  double LocalPlacement(vtkIdType root, vtkPoints* points);
104 
105  void GlobalPlacement(vtkIdType root, vtkPoints* points,
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
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkIdType
Definition: vtkType.h:315
abstract superclass for all graph layout strategies
int vtkTypeBool
Definition: vtkABI.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
produce a cone-tree layout for a forest
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent and manipulate 3D points
Definition: vtkPoints.h:28
virtual void Layout()=0
This is the layout method where the graph that was set in SetGraph() is laid out. ...