VTK  9.2.6
vtkConeLayoutStrategy.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkConeLayoutStrategy.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15//-------------------------------------------------------------------------
16// Copyright 2008 Sandia Corporation.
17// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18// the U.S. Government retains certain rights in this software.
19//-------------------------------------------------------------------------
20
49#ifndef vtkConeLayoutStrategy_h
50#define vtkConeLayoutStrategy_h
51
53#include "vtkInfovisLayoutModule.h" // For export macro
54
55class vtkPoints;
56
57class VTKINFOVISLAYOUT_EXPORT vtkConeLayoutStrategy : public vtkGraphLayoutStrategy
58{
59public:
61
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
66
73 vtkSetMacro(Compactness, float);
74 vtkGetMacro(Compactness, float);
76
78
85 vtkSetMacro(Compression, vtkTypeBool);
86 vtkGetMacro(Compression, vtkTypeBool);
87 vtkBooleanMacro(Compression, vtkTypeBool);
89
91
98 vtkSetMacro(Spacing, float);
99 vtkGetMacro(Spacing, float);
101
105 void Layout() override;
106
107protected:
110
119 double LocalPlacement(vtkIdType root, vtkPoints* points);
120
122 double refX, // absolute x-y coordinate of
123 double refY, // parent node; z coordinate
124 double level); // derived from level.
125
126 float Compactness; // factor used in mapping layer to Z
127 vtkTypeBool Compression; // force a compact layout?
128 float Spacing; // Scale vertical spacing of cones.
129
130 // Values accumulated for possible statistical use
131 double MinRadius;
132 double MaxRadius;
135
136private:
138 void operator=(const vtkConeLayoutStrategy&) = delete;
139};
140
141#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:40
represent and manipulate 3D points
Definition vtkPoints.h:40
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332