Skip to content

Commit 239b243

Browse files
LeviEyalfloryst
authored andcommitted
refactor(vtk-axes-actor): fix types of AxisColor
1 parent 14fabed commit 239b243

File tree

1 file changed

+101
-98
lines changed

1 file changed

+101
-98
lines changed

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

Lines changed: 101 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,102 @@
11
import vtkActor, { IActorInitialValues } from '../Actor';
2+
import { RGBColor } from '../../../types';
23

34
/**
4-
*
5+
* Represents the initial values for the AxesActor.
56
*/
67
export interface IAxesActorInitialValues extends IActorInitialValues {}
78

9+
/**
10+
* Represents an actor that displays axes in a 3D scene.
11+
*/
812
export interface vtkAxesActor extends vtkActor {
9-
10-
/**
11-
*
12-
*/
13-
getConfig(): object;
14-
15-
/**
16-
*
17-
*/
18-
getXConfig(): object;
19-
20-
/**
21-
*
22-
*/
23-
getYConfig(): object;
24-
25-
/**
26-
*
27-
*/
28-
getZConfig(): object;
29-
30-
/**
31-
*
32-
*/
33-
getXAxisColor(): number[];
34-
35-
/**
36-
*
37-
*/
38-
getYAxisColor(): number[];
39-
40-
/**
41-
*
42-
*/
43-
getZAxisColor(): number[];
44-
45-
/**
46-
*
47-
* @param config
48-
*/
49-
setConfig(config: object): boolean;
50-
51-
/**
52-
*
53-
* @param config
54-
*/
55-
setXConfig(config: object): boolean;
56-
57-
/**
58-
*
59-
* @param config
60-
*/
61-
setYConfig(config: object): boolean;
62-
63-
/**
64-
*
65-
* @param config
66-
*/
67-
setZConfig(config: object): boolean;
68-
69-
/**
70-
* Set X axis color.
71-
* @param {Number} r Defines the red component (between 0 and 1).
72-
* @param {Number} g Defines the green component (between 0 and 1).
73-
* @param {Number} b Defines the blue component (between 0 and 1).
74-
*/
75-
setXAxisColor(r: number, g: number, b: number): boolean;
76-
77-
/**
78-
* Set Y axis color.
79-
* @param {Number} r Defines the red component (between 0 and 1).
80-
* @param {Number} g Defines the green component (between 0 and 1).
81-
* @param {Number} b Defines the blue component (between 0 and 1).
82-
*/
83-
setYAxisColor(r: number, g: number, b: number): boolean;
84-
85-
/**
86-
* Set Z axis color.
87-
* @param {Number} r Defines the red component (between 0 and 1).
88-
* @param {Number} g Defines the green component (between 0 and 1).
89-
* @param {Number} b Defines the blue component (between 0 and 1).
90-
*/
91-
setZAxisColor(r: number, g: number, b: number): boolean;
92-
93-
/**
94-
*
95-
*/
96-
update(): void;
13+
/**
14+
* Get config object of the actor.
15+
*/
16+
getConfig(): object;
17+
18+
/**
19+
* Get config object of the X axis.
20+
*/
21+
getXConfig(): object;
22+
23+
/**
24+
* Get config object of the Y axis.
25+
*/
26+
getYConfig(): object;
27+
28+
/**
29+
* Get config object of the Z axis.
30+
*/
31+
getZConfig(): object;
32+
33+
/**
34+
* Retrieves the color of the X-axis.
35+
*
36+
* @return {RGBColor} The color of the X-axis.
37+
*/
38+
getXAxisColor(): RGBColor;
39+
40+
/**
41+
* Retrieves the color of the Y-axis.
42+
*
43+
* @return {RGBColor} The color of the Y-axis.
44+
*/
45+
getYAxisColor(): RGBColor;
46+
47+
/**
48+
* Retrieves the color of the Z-axis.
49+
*
50+
* @return {RGBColor} The color of the Z-axis.
51+
*/
52+
getZAxisColor(): RGBColor;
53+
54+
/**
55+
* Set config object of the actor.
56+
* @param config
57+
*/
58+
setConfig(config: object): boolean;
59+
60+
/**
61+
* Set config object of the X axis.
62+
* @param config
63+
*/
64+
setXConfig(config: object): boolean;
65+
66+
/**
67+
* Set config object of the Y axis.
68+
* @param config
69+
*/
70+
setYConfig(config: object): boolean;
71+
72+
/**
73+
* Set config object of the Z axis.
74+
* @param config
75+
*/
76+
setZConfig(config: object): boolean;
77+
78+
/**
79+
* Set X axis color.
80+
* @param {RGBColor} rgb An Array of the RGB color.
81+
*/
82+
setXAxisColor(rgb: RGBColor): boolean;
83+
84+
/**
85+
* Set Y axis color.
86+
* @param {RGBColor} rgb An Array of the RGB color.
87+
*/
88+
setYAxisColor(rgb: RGBColor): boolean;
89+
90+
/**
91+
* Set Z axis color.
92+
* @param {RGBColor} rgb An Array of the RGB color.
93+
*/
94+
setZAxisColor(rgb: RGBColor): boolean;
95+
96+
/**
97+
* Update the actor.
98+
*/
99+
update(): void;
97100
}
98101

99102
/**
@@ -111,15 +114,15 @@ export function extend(publicAPI: object, model: object, initialValues?: IAxesAc
111114
*/
112115
export function newInstance(initialValues?: IAxesActorInitialValues): vtkAxesActor;
113116

114-
/**
115-
* vtkAxesActor is a hybrid 2D/3D actor used to represent 3D axes in a scene.
116-
* The user can define the geometry to use for the shaft or the tip,
117-
* and the user can set the text for the three axes. The text will appear
118-
* to follow the camera since it is implemented by means of vtkCaptionActor2D.
119-
* All of the functionality of the underlying vtkCaptionActor2D objects are accessible so that,
120-
* for instance, the font attributes of the axes text can be manipulated through vtkTextProperty.
121-
* Since this class inherits from vtkProp3D, one can apply a user transform to the underlying
122-
* geometry and the positioning of the labels. For example, a rotation transform could be used to
117+
/**
118+
* vtkAxesActor is a hybrid 2D/3D actor used to represent 3D axes in a scene.
119+
* The user can define the geometry to use for the shaft or the tip,
120+
* and the user can set the text for the three axes. The text will appear
121+
* to follow the camera since it is implemented by means of vtkCaptionActor2D.
122+
* All of the functionality of the underlying vtkCaptionActor2D objects are accessible so that,
123+
* for instance, the font attributes of the axes text can be manipulated through vtkTextProperty.
124+
* Since this class inherits from vtkProp3D, one can apply a user transform to the underlying
125+
* geometry and the positioning of the labels. For example, a rotation transform could be used to
123126
* generate a left-handed axes representation.
124127
* @see [vtkAnnotatedCubeActor](./Rendering_Core_AnnotatedCubeActor.html)
125128
* @see [vtkOrientationMarkerWidget](./Interaction_Widgets_OrientationMarkerWidget.html)

0 commit comments

Comments
 (0)