VTK  9.4.20250207
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
36#include "vtkInfovisLayoutModule.h" // For export macro
37
38VTK_ABI_NAMESPACE_BEGIN
39class vtkPoints;
40
41class VTKINFOVISLAYOUT_EXPORT vtkConeLayoutStrategy : public vtkGraphLayoutStrategy
42{
43public:
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
91protected:
94
103 double LocalPlacement(vtkIdType root, vtkPoints* points);
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;
119
120private:
122 void operator=(const vtkConeLayoutStrategy&) = delete;
123};
124
125VTK_ABI_NAMESPACE_END
126#endif
produce a cone-tree layout for a forest
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.
static vtkConeLayoutStrategy * New()
~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:139
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:315