forked from Kitware/vtk-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
176 lines (147 loc) · 3.27 KB
/
index.d.ts
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import { vtkObject } from "../../../interfaces";
import vtkRenderPass from "../RenderPass";
export enum PASS_TYPES {
'Build',
'Render'
}
/**
*
*/
export interface IViewNodeInitialValues {
parent?: null,
renderable?: null,
myFactory?: null,
children?: Array<any>;
visited?: boolean;
}
export interface vtkViewNode extends vtkObject {
/**
*
* @param dobj
*/
addMissingNode(dobj: any): void;
/**
*
* @param dataObjs
*/
addMissingNodes(dataObjs: any): void;
/**
*
* @param {vtkRenderPass} renderPass
* @param prepass
*/
apply(renderPass: vtkRenderPass, prepass: boolean): void;
/**
* Builds myself.
* @param prepass
*/
build(prepass: any): void;
/**
*
* @param dataObj
*/
createViewNode(dataObj: any): void;
/**
*
*/
getChildren(): any;
/**
*
*/
getChildrenByReference(): any;
/**
* Find the first parent/grandparent of the desired type
* @param type
*/
getFirstAncestorOfType(type: any): void;
/**
*
*/
getMyFactory(): any;
/**
*
*/
getParent(): any;
/**
* Get The data object (thing to be rendered).
*/
getRenderable(): any;
/**
* Returns the view node that corresponding to the provided object
* Will return NULL if a match is not found in self or descendents
* @param dataObject
*/
getViewNodeFor(dataObject: any): any;
/**
*
*/
getVisited(): boolean;
//invokeEvent
//onEvent(callback: (instance: vtkObject) => any): vtkSubscription;
/**
*
*/
prepareNodes(): void;
/**
*
*/
removeUnusedNodes(): void;
/**
* Makes calls to make self visible.
* @param prepass
*/
render(prepass: any): void;
/**
*
* @param myFactory
*/
setMyFactory(myFactory: any): boolean;
/**
*
* @param parent
*/
setParent(parent: any): boolean;
/**
*
* @param renderable
*/
setRenderable(renderable: any): boolean;
/**
*
* @param val
*/
setVisited(val: boolean): void;
/**
* Traverse this node with the specified pass. If you want to traverse your
* children in a specific order or way override this method
* @param {vtkRenderPass} renderPass
*/
traverse(renderPass: vtkRenderPass): void;
}
/**
* Method used to decorate a given object (publicAPI+model) with vtkViewNode characteristics.
*
* @param publicAPI object on which methods will be bounds (public)
* @param model object on which data structure will be bounds (protected)
* @param {IViewNodeInitialValues} [initialValues] (default: {})
*/
export function extend(publicAPI: object, model: object, initialValues?: IViewNodeInitialValues): void;
/**
* Method used to create a new instance of vtkViewNode.
* @param {IViewNodeInitialValues} [initialValues] for pre-setting some of its content
*/
export function newInstance(initialValues?: IViewNodeInitialValues): vtkViewNode;
/**
* a node within a VTK scene graph
*
* This is the superclass for all nodes within a VTK scene graph. It contains
* the API for a node. It supports the essential operations such as graph
* creation, state storage and traversal. Child classes adapt this to VTK's
* major rendering classes. Grandchild classes adapt those to for APIs of
* different rendering libraries.
*/
export declare const vtkViewNode: {
newInstance: typeof newInstance,
extend: typeof extend,
};
export default vtkViewNode;