VTK: Infovis/Layout/vtkSimple3DCirclesStrategy.h Source File

| VTK 9.3.1

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
36 #include "vtkGraphLayoutStrategy.h"
37 #include "vtkInfovisLayoutModule.h" // For export macro
38 #include "vtkVariant.h" // For variant API
39
40 VTK_ABI_NAMESPACE_BEGIN
41 class vtkAbstractArray;
42 class vtkDirectedGraph;
43 class vtkIdTypeArray;
44 class vtkIntArray;
45 class vtkSimple3DCirclesStrategyInternal;
46
47 class VTKINFOVISLAYOUT_EXPORT vtkSimple3DCirclesStrategy : public vtkGraphLayoutStrategy
48 {
49 public:
50 static vtkSimple3DCirclesStrategy* New();
51 vtkTypeMacro(vtkSimple3DCirclesStrategy, vtkGraphLayoutStrategy);
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
108 virtual void SetMarkedStartVertices(vtkAbstractArray* _arg);
109 vtkGetObjectMacro(MarkedStartVertices, vtkAbstractArray);
112
115 virtual void SetMarkedValue(vtkVariant _arg);
116 virtual vtkVariant GetMarkedValue();
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
159 virtual void SetHierarchicalLayers(vtkIntArray* _arg);
160 vtkGetObjectMacro(HierarchicalLayers, vtkIntArray);
163
168 virtual void SetHierarchicalOrder(vtkIdTypeArray* _arg);
169 vtkGetObjectMacro(HierarchicalOrder, vtkIdTypeArray);
171
174 void Layout() override;
179 void SetGraph(vtkGraph* graph) override;
180
181 protected:
182 vtkSimple3DCirclesStrategy();
183 ~vtkSimple3DCirclesStrategy() override;
184
185 inline void Transform(double Local[], double Global[]);
186
187 double Radius;
188 double Height;
189 double Origin[3];
190 double Direction[3];
191 int Method;
192 vtkAbstractArray* MarkedStartVertices;
193 vtkVariant MarkedValue;
194 vtkTypeBool ForceToUseUniversalStartPointsFinder;
195 vtkTypeBool AutoHeight;
196 double MinimumRadian;
197
198 vtkIntArray* HierarchicalLayers;
199 vtkIdTypeArray* HierarchicalOrder;
200
201 private:
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
223 vtkSimple3DCirclesStrategy(const vtkSimple3DCirclesStrategy&) = delete;
224 void operator=(const vtkSimple3DCirclesStrategy&) = delete;
225 };
226
227 VTK_ABI_NAMESPACE_END
228 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkDirectedGraph
A directed graph.
Definition: vtkDirectedGraph.h:42
vtkGraphLayoutStrategy
abstract superclass for all graph layout strategies
Definition: vtkGraphLayoutStrategy.h:40
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:290
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:37
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:44
vtkSimple3DCirclesStrategy
places vertices on circles in 3D
Definition: vtkSimple3DCirclesStrategy.h:48
vtkSimple3DCirclesStrategy::ForceToUseUniversalStartPointsFinder
vtkTypeBool ForceToUseUniversalStartPointsFinder
Definition: vtkSimple3DCirclesStrategy.h:194
vtkSimple3DCirclesStrategy::GetMarkedValue
virtual vtkVariant GetMarkedValue()
Set or get MarkedValue.
vtkSimple3DCirclesStrategy::Layout
void Layout() override
Standard layout method.
vtkSimple3DCirclesStrategy::Radius
double Radius
Definition: vtkSimple3DCirclesStrategy.h:187
vtkSimple3DCirclesStrategy::HierarchicalOrder
vtkIdTypeArray * HierarchicalOrder
Definition: vtkSimple3DCirclesStrategy.h:199
vtkSimple3DCirclesStrategy::New
static vtkSimple3DCirclesStrategy * New()
vtkSimple3DCirclesStrategy::SetMarkedStartVertices
virtual void SetMarkedStartVertices(vtkAbstractArray *_arg)
Set or get initial vertices.
vtkSimple3DCirclesStrategy::SetGraph
void SetGraph(vtkGraph *graph) override
Set graph (warning: HierarchicalOrder and HierarchicalLayers will set to zero.
vtkSimple3DCirclesStrategy::~vtkSimple3DCirclesStrategy
~vtkSimple3DCirclesStrategy() override
vtkSimple3DCirclesStrategy::Height
double Height
Definition: vtkSimple3DCirclesStrategy.h:188
vtkSimple3DCirclesStrategy::GetMinimumDegree
virtual double GetMinimumDegree()
Set or get minimum degree (used by auto height).
vtkSimple3DCirclesStrategy::SetDirection
virtual void SetDirection(double dx, double dy, double dz)
Set or get the normal vector of the circles plain.
vtkSimple3DCirclesStrategy::SetMinimumDegree
virtual void SetMinimumDegree(double degree)
Set or get minimum degree (used by auto height).
vtkSimple3DCirclesStrategy::SetMarkedValue
virtual void SetMarkedValue(vtkVariant _arg)
Set or get MarkedValue.
vtkSimple3DCirclesStrategy::Method
int Method
Definition: vtkSimple3DCirclesStrategy.h:191
vtkSimple3DCirclesStrategy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSimple3DCirclesStrategy::MarkedValue
vtkVariant MarkedValue
Definition: vtkSimple3DCirclesStrategy.h:193
vtkSimple3DCirclesStrategy::MinimumRadian
double MinimumRadian
Definition: vtkSimple3DCirclesStrategy.h:196
vtkSimple3DCirclesStrategy::AutoHeight
vtkTypeBool AutoHeight
Definition: vtkSimple3DCirclesStrategy.h:195
vtkSimple3DCirclesStrategy::SetHierarchicalOrder
virtual void SetHierarchicalOrder(vtkIdTypeArray *_arg)
Set or get hierarchical ordering of vertices (The array starts from the first vertex's id.
vtkSimple3DCirclesStrategy::MarkedStartVertices
vtkAbstractArray * MarkedStartVertices
Definition: vtkSimple3DCirclesStrategy.h:192
vtkSimple3DCirclesStrategy::SetHierarchicalLayers
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...
vtkSimple3DCirclesStrategy::SetDirection
virtual void SetDirection(double d[3])
Set or get the normal vector of the circles plain.
vtkSimple3DCirclesStrategy::vtkSimple3DCirclesStrategy
vtkSimple3DCirclesStrategy()
vtkSimple3DCirclesStrategy::Transform
void Transform(double Local[], double Global[])
vtkSimple3DCirclesStrategy::HierarchicalLayers
vtkIntArray * HierarchicalLayers
Definition: vtkSimple3DCirclesStrategy.h:198
vtkVariant
A type representing the union of many types.
Definition: vtkVariant.h:62
vtkX3D::order
@ order
Definition: vtkX3D.h:440
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
degree
boost::graph_traits< vtkGraph * >::degree_size_type degree(boost::graph_traits< vtkGraph * >::vertex_descriptor u, vtkGraph *g)
Definition: vtkBoostGraphAdapter.h:1049
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:964
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:970
vtkGraphLayoutStrategy.h
vtkVariant.h