forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkRenderedHierarchyRepresentation.h
146 lines (119 loc) · 5.22 KB
/
vtkRenderedHierarchyRepresentation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/*=========================================================================
Program: Visualization Toolkit
Module: vtkRenderedHierarchyRepresentation.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*-------------------------------------------------------------------------
Copyright 2008 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/
/**
* @class vtkRenderedHierarchyRepresentation
*
*
*/
#ifndef vtkRenderedHierarchyRepresentation_h
#define vtkRenderedHierarchyRepresentation_h
#include "vtkRenderedGraphRepresentation.h"
#include "vtkViewsInfovisModule.h" // For export macro
class VTKVIEWSINFOVIS_EXPORT vtkRenderedHierarchyRepresentation
: public vtkRenderedGraphRepresentation
{
public:
static vtkRenderedHierarchyRepresentation* New();
vtkTypeMacro(vtkRenderedHierarchyRepresentation, vtkRenderedGraphRepresentation);
void PrintSelf(ostream& os, vtkIndent indent) override;
//@{
/**
*/
virtual void SetGraphEdgeLabelArrayName(const char* name)
{
this->SetGraphEdgeLabelArrayName(name, 0);
}
virtual void SetGraphEdgeLabelArrayName(const char* name, int idx);
virtual const char* GetGraphEdgeLabelArrayName() { return this->GetGraphEdgeLabelArrayName(0); }
virtual const char* GetGraphEdgeLabelArrayName(int idx);
//@}
virtual void SetGraphEdgeLabelVisibility(bool vis) { this->SetGraphEdgeLabelVisibility(vis, 0); }
virtual void SetGraphEdgeLabelVisibility(bool vis, int idx);
virtual bool GetGraphEdgeLabelVisibility() { return this->GetGraphEdgeLabelVisibility(0); }
virtual bool GetGraphEdgeLabelVisibility(int idx);
vtkBooleanMacro(GraphEdgeLabelVisibility, bool);
virtual void SetGraphEdgeColorArrayName(const char* name)
{
this->SetGraphEdgeColorArrayName(name, 0);
}
virtual void SetGraphEdgeColorArrayName(const char* name, int idx);
virtual const char* GetGraphEdgeColorArrayName() { return this->GetGraphEdgeColorArrayName(0); }
virtual const char* GetGraphEdgeColorArrayName(int idx);
virtual void SetColorGraphEdgesByArray(bool vis) { this->SetColorGraphEdgesByArray(vis, 0); }
virtual void SetColorGraphEdgesByArray(bool vis, int idx);
virtual bool GetColorGraphEdgesByArray() { return this->GetColorGraphEdgesByArray(0); }
virtual bool GetColorGraphEdgesByArray(int idx);
vtkBooleanMacro(ColorGraphEdgesByArray, bool);
virtual void SetGraphEdgeColorToSplineFraction()
{
this->SetGraphEdgeColorArrayName("fraction", 0);
}
virtual void SetGraphEdgeColorToSplineFraction(int idx)
{
this->SetGraphEdgeColorArrayName("fraction", idx);
}
virtual void SetGraphVisibility(bool vis) { this->SetGraphVisibility(vis, 0); }
virtual void SetGraphVisibility(bool vis, int idx);
virtual bool GetGraphVisibility() { return this->GetGraphVisibility(0); }
virtual bool GetGraphVisibility(int idx);
vtkBooleanMacro(GraphVisibility, bool);
virtual void SetBundlingStrength(double strength) { this->SetBundlingStrength(strength, 0); }
virtual void SetBundlingStrength(double strength, int idx);
virtual double GetBundlingStrength() { return this->GetBundlingStrength(0); }
virtual double GetBundlingStrength(int idx);
//@{
/**
* Sets the spline type for the graph edges.
* vtkSplineGraphEdges::CUSTOM uses a vtkCardinalSpline.
* vtkSplineGraphEdges::BSPLINE uses a b-spline.
* The default is BSPLINE.
*/
virtual void SetGraphSplineType(int type, int idx);
virtual int GetGraphSplineType(int idx);
//@}
virtual void SetGraphEdgeLabelFontSize(int size) { this->SetGraphEdgeLabelFontSize(size, 0); }
virtual void SetGraphEdgeLabelFontSize(int size, int idx);
virtual int GetGraphEdgeLabelFontSize() { return this->GetGraphEdgeLabelFontSize(0); }
virtual int GetGraphEdgeLabelFontSize(int idx);
protected:
vtkRenderedHierarchyRepresentation();
~vtkRenderedHierarchyRepresentation() override;
//@{
/**
* Called by the view to add/remove this representation.
*/
bool AddToView(vtkView* view) override;
bool RemoveFromView(vtkView* view) override;
//@}
/**
* Whether idx is a valid graph index.
*/
bool ValidIndex(int idx);
vtkSelection* ConvertSelection(vtkView* view, vtkSelection* sel) override;
int FillInputPortInformation(int port, vtkInformation* info) override;
/**
* Sets up the input connections for this representation.
*/
int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
vtkInformationVector* outputVector) override;
void ApplyViewTheme(vtkViewTheme* theme) override;
class Internals;
Internals* Implementation;
private:
vtkRenderedHierarchyRepresentation(const vtkRenderedHierarchyRepresentation&) = delete;
void operator=(const vtkRenderedHierarchyRepresentation&) = delete;
};
#endif