@kitware/vtk.js 19.7.2 → 19.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -154,15 +154,7 @@ export function extend(publicAPI: object, model: object, initialValues?: IPolyDa
|
|
|
154
154
|
export function newInstance(initialValues?: IPolyDataInitialValues): vtkPolyData;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* vtkPolyData
|
|
158
|
-
* tiling in a plane. The plane is defined by specifying an origin point, and then
|
|
159
|
-
* two other points that, together with the origin, define two axes for the plane.
|
|
160
|
-
* These axes do not have to be orthogonal - so you can create a parallelogram.
|
|
161
|
-
* (The axes must not be parallel.) The resolution of the plane (i.e., number of
|
|
162
|
-
* subdivisions) is controlled by the ivars XResolution and YResolution.
|
|
163
|
-
*
|
|
164
|
-
* By default, the plane is centered at the origin and perpendicular to the z-axis,
|
|
165
|
-
* with width and height of length 1 and resolutions set to 1.
|
|
157
|
+
* vtkPolyData is a dataset that represents a geometric structure consisting of vertices, lines, polygons, and/or strips.
|
|
166
158
|
*/
|
|
167
159
|
export declare const vtkPolyData: {
|
|
168
160
|
newInstance: typeof newInstance,
|
|
@@ -44,7 +44,7 @@ export interface vtkLineSource extends vtkLineSourceBase {
|
|
|
44
44
|
getPoint2ByReference(): Vector3;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* Get the
|
|
47
|
+
* Get the resolution of the line.
|
|
48
48
|
* @default 6
|
|
49
49
|
*/
|
|
50
50
|
getResolution(): number;
|
|
@@ -91,8 +91,8 @@ export interface vtkLineSource extends vtkLineSourceBase {
|
|
|
91
91
|
setPoint2From(point2: Vector3): boolean;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* Set the number of
|
|
95
|
-
* @param {Number} resolution The number of
|
|
94
|
+
* Set the number of segments used to represent the line.
|
|
95
|
+
* @param {Number} resolution The number of segments.
|
|
96
96
|
*/
|
|
97
97
|
setResolution(resolution: number): boolean;
|
|
98
98
|
}
|
|
@@ -113,11 +113,9 @@ export function extend(publicAPI: object, model: object, initialValues?: ILineSo
|
|
|
113
113
|
export function newInstance(initialValues?: ILineSourceInitialValues): vtkLineSource;
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
* vtkLineSource creates a
|
|
117
|
-
* The
|
|
118
|
-
*
|
|
119
|
-
* It is also possible to control whether the cylinder is open-ended or capped.
|
|
120
|
-
* If you have the end points of the cylinder, you should use a vtkLineSource followed by a vtkTubeFilter instead of the vtkLineSource.
|
|
116
|
+
* vtkLineSource creates a line segment from point1 to point2;
|
|
117
|
+
* The resolution can be specified, which determines the number of points along the line.
|
|
118
|
+
* Following a vtkLineSource by a vtkTubeFilter is a convenient way to create a cylinder based on endpoints.
|
|
121
119
|
*
|
|
122
120
|
* @example
|
|
123
121
|
* ```js
|
|
@@ -28,8 +28,8 @@ function vtkLineSource(publicAPI, model) {
|
|
|
28
28
|
} // hand create a line with special scalars
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
32
|
-
var numPts =
|
|
31
|
+
var res = model.resolution;
|
|
32
|
+
var numPts = res + 1; // Points
|
|
33
33
|
|
|
34
34
|
var points = macro.newTypedArray(pointDataType, numPts * 3);
|
|
35
35
|
pd.getPoints().setData(points, 3); // Cells
|
|
@@ -39,8 +39,8 @@ function vtkLineSource(publicAPI, model) {
|
|
|
39
39
|
var idx = 0;
|
|
40
40
|
var t = 0.0;
|
|
41
41
|
|
|
42
|
-
for (var i = 0; i <
|
|
43
|
-
t = i /
|
|
42
|
+
for (var i = 0; i < res + 1; i++) {
|
|
43
|
+
t = i / res;
|
|
44
44
|
points[idx * 3] = model.point1[0] + t * v21[0];
|
|
45
45
|
points[idx * 3 + 1] = model.point1[1] + t * v21[1];
|
|
46
46
|
points[idx * 3 + 2] = model.point1[2] + t * v21[2];
|
|
@@ -102,7 +102,7 @@ function extend(publicAPI, model) {
|
|
|
102
102
|
macro.obj(publicAPI, model);
|
|
103
103
|
vtkCompositeMouseManipulator.extend(publicAPI, model, initialValues);
|
|
104
104
|
vtkCompositeCameraManipulator.extend(publicAPI, model, initialValues);
|
|
105
|
-
macro.setGet(publicAPI, model, ['flipDirection']); // Object specific methods
|
|
105
|
+
macro.setGet(publicAPI, model, ['zoomScale', 'flipDirection']); // Object specific methods
|
|
106
106
|
|
|
107
107
|
vtkMouseCameraTrackballZoomManipulator(publicAPI, model);
|
|
108
108
|
} // ----------------------------------------------------------------------------
|