Skip to content

Commit 27f4b25

Browse files
committed
docs(ts): Add more typescript definitions
1 parent ee0de4d commit 27f4b25

File tree

7 files changed

+314
-22
lines changed

7 files changed

+314
-22
lines changed

Sources/Common/Core/ScalarsToColors/api.md

Whitespace-only changes.

Sources/Common/DataModel/PiecewiseFunction/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { Range } from "../../../types";
33

44
export interface IPiecewiseFunctionInitialValues {
55
range?: Range,
6-
clamping?: boolean,
7-
allowDuplicateScalars?: boolean,
6+
clamping?: boolean,
7+
allowDuplicateScalars?: boolean,
88
}
99

1010
export interface vtkPiecewiseFunction extends vtkObject {

Sources/IO/Core/ImageStream/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Size } from "../../../types";
77
*/
88
export interface IImageStreamInitialValues {
99
viewStreams?: any[],
10-
serverAnimationFPS?: number,
10+
serverAnimationFPS?: number,
1111
}
1212

1313

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export interface vtkProp extends vtkObject {
110110
/**
111111
*
112112
*/
113-
getNestedProps(): null;
113+
getNestedProps(): any;
114114

115115
/**
116116
* Return parent prop set by setParentProp

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ export interface vtkProp3D extends vtkProp {
5252
getOrientationWXYZ(): number[];
5353

5454
/**
55-
* Get the origin of the Prop3D. This is the point about which all rotations take place.
55+
* Get the origin of the Prop3D. This is the point about which all rotations
56+
* take place.
5657
*/
5758
getOrigin(): number[];
5859

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

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import vtkProp3D from '../Prop3D';
77
import vtkViewport, { IViewportInitialValues } from '../Viewport';
88
import vtkVolume from '../Volume';
99
import vtkTexture from '../Texture';
10+
import vtkActor from '../Actor';
1011

1112

1213
export interface IRendererInitialValues extends IViewportInitialValues {
@@ -49,11 +50,11 @@ export interface vtkRenderer extends vtkViewport {
4950
*
5051
* @param actor
5152
*/
52-
addActor(actor: vtkProp3D): boolean;
53+
addActor(actor: vtkActor): boolean;
5354

5455
/**
5556
* Add a light to the list of lights.
56-
* @param light
57+
* @param light The vtkLight instance.
5758
*/
5859
addLight(light: vtkLight): void;
5960

@@ -63,8 +64,8 @@ export interface vtkRenderer extends vtkViewport {
6364
allocateTime(): any;
6465

6566
/**
66-
*
67-
* @param volume
67+
* Add a volume to the renderer..
68+
* @param volume The vtkVolume instance.
6869
*/
6970
addVolume(volume: vtkVolume): boolean;
7071

@@ -92,13 +93,13 @@ export interface vtkRenderer extends vtkViewport {
9293
* Return any actors in this renderer.
9394
*
9495
*/
95-
getActors(): vtkProp3D[];
96+
getActors(): vtkActor[];
9697

9798
/**
9899
* Return any actors in this renderer.
99100
*
100101
*/
101-
getActorsByReference(): vtkProp3D[];
102+
getActorsByReference(): vtkActor[];
102103

103104
/**
104105
*
@@ -115,7 +116,7 @@ export interface vtkRenderer extends vtkViewport {
115116
*
116117
* @default null
117118
*/
118-
getBackgroundTexture(): vtkTexture | null;
119+
getBackgroundTexture(): vtkTexture;
119120

120121
/**
121122
*
@@ -472,9 +473,9 @@ export interface vtkRenderer extends vtkViewport {
472473

473474
/**
474475
*
475-
* @param {vtkProp3D | null} actor
476+
* @param {vtkActor} actor
476477
*/
477-
removeActor(actor: vtkProp3D | null): void;
478+
removeActor(actor: vtkActor): void;
478479

479480
/**
480481
*
@@ -539,19 +540,23 @@ export interface vtkRenderer extends vtkViewport {
539540
viewToProjection(x: number, y: number, z: number, aspect: number): number[];
540541

541542
/**
543+
* Automatically set up the camera based on the visible actors.
542544
*
543-
* @param {Number[]} [bounds]
545+
* The camera will reposition itself to view the center point of the actors,
546+
* and move along its initial view plane normal (i.e., vector defined from
547+
* camera position to focal point) so that all of the actors can be seen.
548+
* @param {Bounds} [bounds]
544549
*/
545-
resetCamera(bounds?: number[]): boolean;
550+
resetCamera(bounds?: Bounds): boolean;
546551

547552
/**
548-
*
549-
* @param {Number[]} [bounds]
553+
* Reset the camera clipping range based on a bounding box.
554+
* @param {Bounds} [bounds]
550555
*/
551-
resetCameraClippingRange(bounds?: number[]): boolean;
556+
resetCameraClippingRange(bounds?: Bounds): boolean;
552557

553558
/**
554-
*
559+
* Get the number of visible actors.
555560
*/
556561
visibleActorCount(): void;
557562

@@ -561,7 +566,7 @@ export interface vtkRenderer extends vtkViewport {
561566
updateGeometry(): any;
562567

563568
/**
564-
*
569+
* Ask the active camera to do whatever it needs to do prior to rendering.
565570
*/
566571
updateCamera(): boolean;
567572

@@ -573,7 +578,9 @@ export interface vtkRenderer extends vtkViewport {
573578
updateLightsGeometryToFollowCamera(): void;
574579

575580
/**
576-
*
581+
* Update the geometry of the lights in the scene that are not in world
582+
* space (for instance, Headlights or CameraLights that are attached to the
583+
* camera).
577584
*/
578585
updateLightGeometry(): boolean;
579586

0 commit comments

Comments
 (0)