Skip to content

Commit 0a0f68f

Browse files
sankheshfloryst
authored andcommitted
refactor(glyph3dmapper): Typescript definition
The mapper expects array name strings for the scale and orientation arrays. This change ensures that the typescript definition reflects the same.
1 parent 31f6ee9 commit 0a0f68f

File tree

1 file changed

+45
-29
lines changed

1 file changed

+45
-29
lines changed

Sources/Rendering/Core/Glyph3DMapper/index.d.ts

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,85 +12,101 @@ interface IPrimitiveCount {
1212
export interface IGlyph3DMapperInitialValues extends IMapperInitialValues {
1313
orient?: boolean;
1414
orientationMode?: OrientationModes;
15-
orientationArray?: number[];
15+
orientationArray?: string;
1616
scaling?: boolean;
1717
scaleFactor?: number;
1818
scaleMode?: ScaleModes;
19-
scaleArray?: number[];
19+
scaleArray?: string;
2020
matrixArray?: number[];
2121
normalArray?: number[];
2222
colorArray?: number[];
2323
}
2424

2525
export interface vtkGlyph3DMapper extends vtkMapper {
2626
/**
27-
* An orientation array is a vtkDataArray with 3 components. The first
28-
* component is the angle of rotation along the X axis. The second component
29-
* is the angle of rotation along the Y axis. The third component is the
30-
* angle of rotation along the Z axis. Orientation is specified in X,Y,Z
31-
* order but the rotations are performed in Z,X an Y.
32-
*
33-
* This definition is compliant with SetOrientation method on vtkProp3D.
27+
* Get the bounds for this mapper as [xmin, xmax, ymin, ymax,zmin, zmax].
28+
* @return {Bounds} The bounds for the mapper.
29+
*/
30+
getBounds(): Bounds;
31+
32+
/**
3433
*
35-
* By using vector or normal there is a degree of freedom or rotation left
36-
* (underconstrained). With the orientation array, there is no degree of
37-
* freedom left.
3834
*/
39-
getOrientationMode(): OrientationModes;
35+
buildArrays(): void;
4036

4137
/**
42-
* Get orientation as string
38+
*
4339
*/
44-
getOrientationModeAsString(): string;
40+
getPrimitiveCount(): IPrimitiveCount;
4541

4642
/**
47-
* Get orientation as array
43+
* Get scale mode
44+
* @default `SCALE_BY_MAGNITUDE`
4845
*/
49-
getOrientationArrayData(): number[];
46+
getScaleMode(): ScaleModes;
5047

5148
/**
5249
* Get scale factor to scale object by.
5350
*/
5451
getScaleFactor(): number;
5552

5653
/**
57-
* Get scale mode
58-
* @default `SCALE_BY_MAGNITUDE`
54+
* Get scale mode as string
5955
*/
60-
getScaleMode(): ScaleModes;
56+
getScaleModeAsString(): string;
6157

6258
/**
63-
* Get scale mode as string
59+
* Sets the name of the array to use as scale values.
60+
* @param {String} arrayName Name of the array
6461
*/
65-
getScaleModeAsString(): string;
62+
setScaleArray(arrayName: Nullable<string>): boolean;
63+
64+
/**
65+
* Gets the name of the array used as scale values.
66+
*/
67+
getScaleArray(): string;
6668

6769
/**
6870
* Get scale mode as array
6971
*/
7072
getScaleArrayData(): number[];
7173

7274
/**
73-
* Get the bounds for this mapper as [xmin, xmax, ymin, ymax,zmin, zmax].
74-
* @return {Bounds} The bounds for the mapper.
75+
* An orientation array is a vtkDataArray with 3 components. The first
76+
* component is the angle of rotation along the X axis. The second component
77+
* is the angle of rotation along the Y axis. The third component is the
78+
* angle of rotation along the Z axis. Orientation is specified in X,Y,Z
79+
* order but the rotations are performed in Z,X an Y.
80+
*
81+
* This definition is compliant with SetOrientation method on vtkProp3D.
82+
*
83+
* By using vector or normal there is a degree of freedom or rotation left
84+
* (underconstrained). With the orientation array, there is no degree of
85+
* freedom left.
7586
*/
76-
getBounds(): Bounds;
87+
getOrientationMode(): OrientationModes;
7788

7889
/**
79-
*
90+
* Get orientation as string
8091
*/
81-
buildArrays(): void;
92+
getOrientationModeAsString(): string;
8293

8394
/**
84-
*
95+
* Get orientation as array
8596
*/
86-
getPrimitiveCount(): IPrimitiveCount;
97+
getOrientationArrayData(): number[];
8798

8899
/**
89100
* Sets the name of the array to use as orientation.
90101
* @param {String} arrayName Name of the array
91102
*/
92103
setOrientationArray(arrayName: Nullable<string>): boolean;
93104

105+
/**
106+
* Gets the name of the array used as orientation values.
107+
*/
108+
getOrientationArray(): string;
109+
94110
/**
95111
* Orientation mode indicates if the OrientationArray provides the direction
96112
* vector for the orientation or the rotations around each axes.

0 commit comments

Comments
 (0)