Skip to content

Commit be716b9

Browse files
committed
docs(ts): Use Vector3 & RGBColor types
1 parent 6e82cca commit be716b9

File tree

13 files changed

+249
-200
lines changed

13 files changed

+249
-200
lines changed

Sources/Filters/Sources/Arrow2DSource/index.d.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { vtkAlgorithm, vtkObject } from "../../../interfaces";
2+
import { Vector3 } from "../../../types";
23

34
export enum ShapeType {
45
TRIANGLE,
@@ -15,10 +16,10 @@ export interface IArrow2DSourceInitialValues {
1516
height?: number;
1617
width?: number;
1718
thickness?: number;
18-
center?: number[];
19+
center?: Vector3;
1920
pointType?: string;
20-
origin?: number[];
21-
direction?: number[];
21+
origin?: Vector3;
22+
direction?: Vector3;
2223
}
2324

2425
type vtkArrow2DSourceBase = vtkObject & Omit<vtkAlgorithm,
@@ -41,23 +42,23 @@ export interface vtkArrow2DSource extends vtkArrow2DSourceBase {
4142
* Get the center of the cone.
4243
* @default [0, 0, 0]
4344
*/
44-
getCenter(): number[];
45+
getCenter(): Vector3;
4546

4647
/**
4748
* Get the center of the cone.
4849
*/
49-
getCenterByReference(): number[];
50+
getCenterByReference(): Vector3;
5051

5152
/**
5253
* Get the orientation vector of the cone.
5354
* @default [1.0, 0.0, 0.0]
5455
*/
55-
getDirection(): number[];
56+
getDirection(): Vector3;
5657

5758
/**
5859
* Get the orientation vector of the cone.
5960
*/
60-
getDirectionByReference(): number[];
61+
getDirectionByReference(): Vector3;
6162

6263
/**
6364
* Get the height of the cone.
@@ -107,10 +108,10 @@ export interface vtkArrow2DSource extends vtkArrow2DSourceBase {
107108
* It is located at the middle of the axis of the cone.
108109
* !!! warning
109110
* This is not the center of the base of the cone!
110-
* @param {Number[]} center The center of the cone coordinates.
111+
* @param {Vector3} center The center of the cone coordinates.
111112
* @default [0, 0, 0]
112113
*/
113-
setCenterFrom(center: number[]): boolean;
114+
setCenterFrom(center: Vector3): boolean;
114115

115116
/**
116117
* Set the direction for the arrow.
@@ -122,15 +123,15 @@ export interface vtkArrow2DSource extends vtkArrow2DSourceBase {
122123

123124
/**
124125
* Set the direction for the arrow 2D.
125-
* @param {Number[]} direction The direction coordinates.
126+
* @param {Vector3} direction The direction coordinates.
126127
*/
127-
setDirection(direction: number[]): boolean;
128+
setDirection(direction: Vector3): boolean;
128129

129130
/**
130131
* Set the direction for the arrow 2D.
131-
* @param {Number[]} direction The direction coordinates.
132+
* @param {Vector3} direction The direction coordinates.
132133
*/
133-
setDirectionFrom(direction: number[]): boolean;
134+
setDirectionFrom(direction: Vector3): boolean;
134135

135136
/**
136137
* Set the height of the cone.

Sources/Filters/Sources/ArrowSource/index.d.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { vtkAlgorithm, vtkObject } from "../../../interfaces";
2+
import { Vector3 } from "../../../types";
23

34
export enum ShapeType {
45
TRIANGLE,
@@ -17,7 +18,7 @@ export interface IArrowSourceInitialValues {
1718
shaftResolution?: number;
1819
shaftRadius?: number;
1920
invert?: boolean;
20-
direction?: number[];
21+
direction?: Vector3;
2122
pointType?: string;
2223
}
2324

@@ -35,12 +36,12 @@ export interface vtkArrowSource extends vtkArrowSourceBase {
3536
* Get the orientation vector of the cone.
3637
* @default [1.0, 0.0, 0.0]
3738
*/
38-
getDirection(): number[];
39+
getDirection(): Vector3;
3940

4041
/**
4142
* Get the orientation vector of the cone.
4243
*/
43-
getDirectionByReference(): number[];
44+
getDirectionByReference(): Vector3;
4445

4546
/**
4647
*
@@ -95,15 +96,15 @@ export interface vtkArrowSource extends vtkArrowSourceBase {
9596

9697
/**
9798
* Set the direction for the arrow.
98-
* @param {Number[]} direction The direction coordinates.
99+
* @param {Vector3} direction The direction coordinates.
99100
*/
100-
setDirection(direction: number[]): boolean;
101+
setDirection(direction: Vector3): boolean;
101102

102103
/**
103104
* Set the direction for the arrow.
104-
* @param {Number[]} direction The direction coordinates.
105+
* @param {Vector3} direction The direction coordinates.
105106
*/
106-
setDirectionFrom(direction: number[]): boolean;
107+
setDirectionFrom(direction: Vector3): boolean;
107108

108109
/**
109110
* Inverts the arrow direction.

Sources/Filters/Sources/CircleSource/index.d.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { vtkAlgorithm, vtkObject } from "../../../interfaces";
2+
import { Vector3 } from "../../../types";
23

34
/**
45
*
56
*/
67
export interface ICircleSourceInitialValues {
78
radius?: number;
89
resolution?: number;
9-
center?: number[];
10+
center?: Vector3;
1011
pointType?: string;
1112
lines?: boolean;
1213
face?: boolean;
@@ -26,23 +27,23 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
2627
* Get the center of the cone.
2728
* @default [0, 0, 0]
2829
*/
29-
getCenter(): number[];
30+
getCenter(): Vector3;
3031

3132
/**
3233
* Get the center of the cone.
3334
*/
34-
getCenterByReference(): number[];
35+
getCenterByReference(): Vector3;
3536

3637
/**
3738
* Get the orientation vector of the cone.
3839
* @default [1.0, 0.0, 0.0]
3940
*/
40-
getDirection(): number[];
41+
getDirection(): Vector3;
4142

4243
/**
4344
* Get the orientation vector of the cone.
4445
*/
45-
getDirectionByReference(): number[];
46+
getDirectionByReference(): Vector3;
4647

4748
/**
4849
*
@@ -85,15 +86,15 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
8586

8687
/**
8788
* Set the direction for the circle.
88-
* @param {Number[]} direction The direction coordinates.
89+
* @param {Vector3} direction The direction coordinates.
8990
*/
90-
setDirection(direction: number[]): boolean;
91+
setDirection(direction: Vector3): boolean;
9192

9293
/**
9394
* Set the direction for the circle.
94-
* @param {Number[]} direction The direction coordinates.
95+
* @param {Vector3} direction The direction coordinates.
9596
*/
96-
setDirectionFrom(direction: number[]): boolean;
97+
setDirectionFrom(direction: Vector3): boolean;
9798

9899
/**
99100
* Set the center of the circle.
@@ -106,10 +107,10 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
106107

107108
/**
108109
* Set the center of the circle.
109-
* @param {Number[]} center
110+
* @param {Vector3} center
110111
* @default [0, 0, 0]
111112
*/
112-
setCenterFrom(center: number[]): boolean;
113+
setCenterFrom(center: Vector3): boolean;
113114

114115
/**
115116
*
@@ -125,13 +126,13 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
125126

126127
/**
127128
* Set the radius of the circle.
128-
* @param {Number} radius
129+
* @param {Number} radius The radius of the circle.
129130
*/
130131
setRadius(radius: number): boolean;
131132

132133
/**
133134
* Set the resolution of the circle.
134-
* @param resolution
135+
* @param {Number} resolution The resolution of the circle.
135136
*/
136137
setResolution(resolution: number): boolean;
137138
}

Sources/Filters/Sources/ConeSource/index.d.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { vtkAlgorithm, vtkObject } from "../../../interfaces";
2+
import { Vector3 } from "../../../types";
23

34
/**
45
*
@@ -7,8 +8,8 @@ export interface IConeSourceInitialValues {
78
height?: number;
89
radius?: number;
910
resolution?: number;
10-
center?: number[] ;
11-
direction?: number[];
11+
center?: Vector3 ;
12+
direction?: Vector3;
1213
capping?: boolean;
1314
pointType?: string;
1415
}
@@ -33,23 +34,23 @@ export interface vtkConeSource extends vtkConeSourceBase {
3334
* Get the center of the cone.
3435
* @default [0, 0, 0]
3536
*/
36-
getCenter(): number[];
37+
getCenter(): Vector3;
3738

3839
/**
3940
* Get the center of the cone.
4041
*/
41-
getCenterByReference(): number[];
42+
getCenterByReference(): Vector3;
4243

4344
/**
4445
* Get the orientation vector of the cone.
4546
* @default [1.0, 0.0, 0.0]
4647
*/
47-
getDirection(): number[];
48+
getDirection(): Vector3;
4849

4950
/**
5051
* Get the orientation vector of the cone.
5152
*/
52-
getDirectionByReference(): number[];
53+
getDirectionByReference(): Vector3;
5354

5455
/**
5556
* Get the height of the cone.
@@ -99,20 +100,20 @@ export interface vtkConeSource extends vtkConeSourceBase {
99100
* It is located at the middle of the axis of the cone.
100101
* !!! warning
101102
* This is not the center of the base of the cone!
102-
* @param {Number[]} center
103+
* @param {Vector3} center
103104
* @default [0, 0, 0]
104105
*/
105-
setCenter(center: number[]): boolean;
106+
setCenter(center: Vector3): boolean;
106107

107108
/**
108109
* Set the center of the cone.
109110
* It is located at the middle of the axis of the cone.
110111
* !!! warning
111112
* This is not the center of the base of the cone!
112-
* @param {Number[]} center
113+
* @param {Vector3} center
113114
* @default [0, 0, 0]
114115
*/
115-
setCenterFrom(center: number[]): boolean;
116+
setCenterFrom(center: Vector3): boolean;
116117

117118
/**
118119
* Set the direction for the cone.
@@ -125,23 +126,23 @@ export interface vtkConeSource extends vtkConeSourceBase {
125126

126127
/**
127128
* Set the direction for the cone.
128-
* @param {Number[]} direction The direction coordinates.
129+
* @param {Vector3} direction The direction coordinates.
129130
*/
130-
setDirection(direction: number[]): boolean;
131+
setDirection(direction: Vector3): boolean;
131132

132133
/**
133134
* Set the direction for the cone.
134-
* @param {Number[]} direction
135+
* @param {Vector3} direction
135136
* @default [1, 0, 0]
136137
*/
137-
setDirection(direction: number[]): boolean;
138+
setDirection(direction: Vector3): boolean;
138139

139140
/**
140141
* Set the direction for the cone.
141-
* @param {Number[]} direction
142+
* @param {Vector3} direction
142143
* @default [1, 0, 0]
143144
*/
144-
setDirectionFrom(direction: number[]): boolean;
145+
setDirectionFrom(direction: Vector3): boolean;
145146

146147
/**
147148
* Set the height of the cone.

0 commit comments

Comments
 (0)