VTK  9.4.20250114
vtkSimple3DCirclesStrategy.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
33#ifndef vtkSimple3DCirclesStrategy_h
34#define vtkSimple3DCirclesStrategy_h
35
37#include "vtkInfovisLayoutModule.h" // For export macro
38#include "vtkVariant.h" // For variant API
39
40VTK_ABI_NAMESPACE_BEGIN
43class vtkIdTypeArray;
44class vtkIntArray;
45class vtkSimple3DCirclesStrategyInternal;
46
47class VTKINFOVISLAYOUT_EXPORT vtkSimple3DCirclesStrategy : public vtkGraphLayoutStrategy
48{
49public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
54 enum
55 {
56 FixedRadiusMethod = 0,
57 FixedDistanceMethod = 1
58 };
59
61
65 vtkSetMacro(Method, int);
66 vtkGetMacro(Method, int);
69
73 vtkSetMacro(Radius, double);
74 vtkGetMacro(Radius, double);
77
81 vtkSetMacro(Height, double);
82 vtkGetMacro(Height, double);
85
88 vtkSetVector3Macro(Origin, double);
89 vtkGetVector3Macro(Origin, double);
92
96 virtual void SetDirection(double dx, double dy, double dz);
97 virtual void SetDirection(double d[3]);
98 vtkGetVector3Macro(Direction, double);
101
109 vtkGetObjectMacro(MarkedStartVertices, vtkAbstractArray);
112
115 virtual void SetMarkedValue(vtkVariant _arg);
119
124 vtkSetMacro(ForceToUseUniversalStartPointsFinder, vtkTypeBool);
125 vtkGetMacro(ForceToUseUniversalStartPointsFinder, vtkTypeBool);
126 vtkBooleanMacro(ForceToUseUniversalStartPointsFinder, vtkTypeBool);
129
134 vtkSetMacro(AutoHeight, vtkTypeBool);
135 vtkGetMacro(AutoHeight, vtkTypeBool);
136 vtkBooleanMacro(AutoHeight, vtkTypeBool);
139
142 vtkSetMacro(MinimumRadian, double);
143 vtkGetMacro(MinimumRadian, double);
146
150 virtual void SetMinimumDegree(double degree);
151 virtual double GetMinimumDegree();
154
160 vtkGetObjectMacro(HierarchicalLayers, vtkIntArray);
163
169 vtkGetObjectMacro(HierarchicalOrder, vtkIdTypeArray);
171
174 void Layout() override;
179 void SetGraph(vtkGraph* graph) override;
180
181protected:
184
185 inline void Transform(double Local[], double Global[]);
186
187 double Radius;
188 double Height;
189 double Origin[3];
190 double Direction[3];
197
200
201private:
206 virtual int UniversalStartPoints(vtkDirectedGraph* input,
207 vtkSimple3DCirclesStrategyInternal* target, vtkSimple3DCirclesStrategyInternal* StandAlones,
208 vtkIntArray* layers);
213 virtual int BuildLayers(
214 vtkDirectedGraph* input, vtkSimple3DCirclesStrategyInternal* source, vtkIntArray* layers);
218 virtual void BuildPointOrder(vtkDirectedGraph* input, vtkSimple3DCirclesStrategyInternal* source,
219 vtkSimple3DCirclesStrategyInternal* StandAlones, vtkIntArray* layers, vtkIdTypeArray* order);
220
221 double T[3][3];
222
224 void operator=(const vtkSimple3DCirclesStrategy&) = delete;
225};
226
227VTK_ABI_NAMESPACE_END
228#endif
Abstract superclass for all arrays.
A directed graph.
abstract superclass for all graph layout strategies
Base class for graph data types.
Definition vtkGraph.h:340
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
dynamic, self-adjusting array of int
places vertices on circles in 3D
virtual vtkVariant GetMarkedValue()
Set or get MarkedValue.
void Layout() override
Standard layout method.
virtual void SetMarkedStartVertices(vtkAbstractArray *_arg)
Set or get initial vertices.
void SetGraph(vtkGraph *graph) override
Set graph (warning: HierarchicalOrder and HierarchicalLayers will set to zero.
~vtkSimple3DCirclesStrategy() override
virtual double GetMinimumDegree()
Set or get minimum degree (used by auto height).
virtual void SetDirection(double dx, double dy, double dz)
Set or get the normal vector of the circles plain.
virtual void SetMinimumDegree(double degree)
Set or get minimum degree (used by auto height).
static vtkSimple3DCirclesStrategy * New()
virtual void SetMarkedValue(vtkVariant _arg)
Set or get MarkedValue.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetHierarchicalOrder(vtkIdTypeArray *_arg)
Set or get hierarchical ordering of vertices (The array starts from the first vertex's id.
virtual void SetHierarchicalLayers(vtkIntArray *_arg)
Set or get hierarchical layers id by vertices (An usual vertex's layer id is greater or equal to zero...
virtual void SetDirection(double d[3])
Set or get the normal vector of the circles plain.
void Transform(double Local[], double Global[])
A type representing the union of many types.
Definition vtkVariant.h:162
int vtkTypeBool
Definition vtkABI.h:64
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
boost::graph_traits< vtkGraph * >::degree_size_type degree(boost::graph_traits< vtkGraph * >::vertex_descriptor u, vtkGraph *g)