@kitware/vtk.js 34.16.7 → 34.18.0
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.
- package/CONTRIBUTING.md +1 -1
- package/Common/Core/Math/index.js +15 -1
- package/Common/Core/Math.d.ts +8 -0
- package/Common/Core/Math.js +1 -1
- package/Filters/General/WindowedSincPolyDataFilter.js +2 -4
- package/Filters/Modeling/RibbonFilter.d.ts +196 -0
- package/Filters/Modeling/RibbonFilter.js +386 -0
- package/Filters/Modeling.js +7 -0
- package/Filters/Sources/PlatonicSolidSource.d.ts +3 -3
- package/Filters/Sources/RegularPolygonSource.d.ts +183 -0
- package/Filters/Sources/RegularPolygonSource.js +150 -0
- package/Filters/Sources.js +2 -0
- package/Proxy/Representations/GlyphRepresentationProxy.js +1 -0
- package/Rendering/Core/AbstractImageMapper.d.ts +4 -0
- package/Rendering/Core/ImageProperty.d.ts +7 -0
- package/Rendering/OpenGL/ImageResliceMapper.js +477 -81
- package/index.d.ts +2 -0
- package/package.json +1 -1
package/CONTRIBUTING.md
CHANGED
|
@@ -128,7 +128,7 @@ The vtk.js documentation is part of the code repository and is entirely written
|
|
|
128
128
|
|
|
129
129
|
If you create an example, please list it in the [examples landing page](Documentation/content/examples/index.md).
|
|
130
130
|
|
|
131
|
-
Images and GIF videos added to the [gallery](Documentation/public/gallery) must be compressed as much as possible (e.g.
|
|
131
|
+
Images and GIF videos added to the [gallery](Documentation/public/gallery) must be compressed as much as possible (e.g. 500px by 280px with 50% JPEG compression). You may want to use [ezgif.com](https://ezgif.com/).
|
|
132
132
|
|
|
133
133
|
## Reporting Issues
|
|
134
134
|
|
|
@@ -1928,6 +1928,18 @@ function getMajorAxisIndex(vector) {
|
|
|
1928
1928
|
}
|
|
1929
1929
|
return axisIndex;
|
|
1930
1930
|
}
|
|
1931
|
+
function getMinorAxisIndex(vector) {
|
|
1932
|
+
let minValue = Infinity;
|
|
1933
|
+
let axisIndex = -1;
|
|
1934
|
+
for (let i = 0; i < vector.length; i++) {
|
|
1935
|
+
const value = Math.abs(vector[i]);
|
|
1936
|
+
if (value < minValue) {
|
|
1937
|
+
axisIndex = i;
|
|
1938
|
+
minValue = value;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
return axisIndex;
|
|
1942
|
+
}
|
|
1931
1943
|
|
|
1932
1944
|
// Return the closest orthogonal matrix of 1, -1 and 0
|
|
1933
1945
|
// It works for both column major and row major matrices
|
|
@@ -2110,6 +2122,7 @@ var vtkMath = {
|
|
|
2110
2122
|
// JS add-on
|
|
2111
2123
|
createUninitializedBounds,
|
|
2112
2124
|
getMajorAxisIndex,
|
|
2125
|
+
getMinorAxisIndex,
|
|
2113
2126
|
getSparseOrthogonalMatrix,
|
|
2114
2127
|
floatToHex2,
|
|
2115
2128
|
floatRGB2HexCode,
|
|
@@ -2232,6 +2245,7 @@ var vtkMath$1 = /*#__PURE__*/Object.freeze({
|
|
|
2232
2245
|
isNan: isNan,
|
|
2233
2246
|
createUninitializedBounds: createUninitializedBounds,
|
|
2234
2247
|
getMajorAxisIndex: getMajorAxisIndex,
|
|
2248
|
+
getMinorAxisIndex: getMinorAxisIndex,
|
|
2235
2249
|
getSparseOrthogonalMatrix: getSparseOrthogonalMatrix,
|
|
2236
2250
|
floatToHex2: floatToHex2,
|
|
2237
2251
|
floatRGB2HexCode: floatRGB2HexCode,
|
|
@@ -2239,4 +2253,4 @@ var vtkMath$1 = /*#__PURE__*/Object.freeze({
|
|
|
2239
2253
|
'default': vtkMath
|
|
2240
2254
|
});
|
|
2241
2255
|
|
|
2242
|
-
export { createArray as $, rowsToMat3 as A, degreesFromRadians as B, ldexp as C, xyz2rgb as D, areEquals as E, clampValue as F, arrayRange as G, getMajorAxisIndex as H, createUninitializedBounds as I, normalize4D as J, identity as K, multiplyMatrix as L, floor as M, isInf as N, rgb2hsv as O, rgb2lab as P, lab2rgb as Q, round as R, normalize2D as S, nearestPowerOfTwo as T, multiply3x3_vect3 as U, getSparseOrthogonalMatrix as V, areBoundsInitialized as W, floatRGB2HexCode as X, isPowerOfTwo as Y, angleBetweenVectors as Z, signedAngleBetweenVectors as _, areMatricesEqual as a, isNaN as a$, Pi as a0, ceil as a1, min as a2, max as a3, arrayMin as a4, arrayMax as a5, ceilLog2 as a6, factorial as a7, binomial as a8, beginCombination as a9, quaternionToMatrix3x3 as aA, roundNumber as aB, matrix3x3ToQuaternion as aC, multiplyQuaternion as aD, orthogonalize3x3 as aE, diagonalize3x3 as aF, singularValueDecomposition3x3 as aG, luFactorLinearSystem as aH, luSolveLinearSystem as aI, estimateMatrixCondition as aJ, solveHomogeneousLeastSquares as aK, solveLeastSquares as aL, hex2float as aM, lab2xyz as aN, xyz2lab as aO, rgb2xyz as aP, computeBoundsFromPoints as aQ, clampAndNormalizeValue as aR, getScalarTypeFittingRange as aS, getAdjustedScalarRange as aT, extentIsWithinOtherExtent as aU, boundsIsWithinOtherBounds as aV, pointIsWithinBounds as aW, solve3PointCircle as aX, inf as aY, negInf as aZ, isFinite as a_, nextCombination as aa, randomSeed as ab, getSeed as ac, gaussian as ad, multiplyScalar2D as ae, multiplyAccumulate2D as af, outer as ag, projectVector as ah, dot2D as ai, projectVector2D as aj, gaussianAmplitude as ak, gaussianWeight as al, outer2D as am, norm2D as an, rowsToMat4 as ao, columnsToMat4 as ap, columnsToMat3 as aq, LUFactor3x3 as ar, LUSolve3x3 as as, linearSolve3x3 as at, multiply3x3_mat3 as au, transpose3x3 as av, invert3x3 as aw, identity3x3 as ax, isIdentity as ay, isIdentity3x3 as az, vtkMath as b,
|
|
2256
|
+
export { createArray as $, rowsToMat3 as A, degreesFromRadians as B, ldexp as C, xyz2rgb as D, areEquals as E, clampValue as F, arrayRange as G, getMajorAxisIndex as H, createUninitializedBounds as I, normalize4D as J, identity as K, multiplyMatrix as L, floor as M, isInf as N, rgb2hsv as O, rgb2lab as P, lab2rgb as Q, round as R, normalize2D as S, nearestPowerOfTwo as T, multiply3x3_vect3 as U, getSparseOrthogonalMatrix as V, areBoundsInitialized as W, floatRGB2HexCode as X, isPowerOfTwo as Y, angleBetweenVectors as Z, signedAngleBetweenVectors as _, areMatricesEqual as a, isNaN as a$, Pi as a0, ceil as a1, min as a2, max as a3, arrayMin as a4, arrayMax as a5, ceilLog2 as a6, factorial as a7, binomial as a8, beginCombination as a9, quaternionToMatrix3x3 as aA, roundNumber as aB, matrix3x3ToQuaternion as aC, multiplyQuaternion as aD, orthogonalize3x3 as aE, diagonalize3x3 as aF, singularValueDecomposition3x3 as aG, luFactorLinearSystem as aH, luSolveLinearSystem as aI, estimateMatrixCondition as aJ, solveHomogeneousLeastSquares as aK, solveLeastSquares as aL, hex2float as aM, lab2xyz as aN, xyz2lab as aO, rgb2xyz as aP, computeBoundsFromPoints as aQ, clampAndNormalizeValue as aR, getScalarTypeFittingRange as aS, getAdjustedScalarRange as aT, extentIsWithinOtherExtent as aU, boundsIsWithinOtherBounds as aV, pointIsWithinBounds as aW, solve3PointCircle as aX, inf as aY, negInf as aZ, isFinite as a_, nextCombination as aa, randomSeed as ab, getSeed as ac, gaussian as ad, multiplyScalar2D as ae, multiplyAccumulate2D as af, outer as ag, projectVector as ah, dot2D as ai, projectVector2D as aj, gaussianAmplitude as ak, gaussianWeight as al, outer2D as am, norm2D as an, rowsToMat4 as ao, columnsToMat4 as ap, columnsToMat3 as aq, LUFactor3x3 as ar, LUSolve3x3 as as, linearSolve3x3 as at, multiply3x3_mat3 as au, transpose3x3 as av, invert3x3 as aw, identity3x3 as ax, isIdentity as ay, isIdentity3x3 as az, vtkMath as b, getMinorAxisIndex as b0, floatToHex2 as b1, float2CssRGBA as b2, roundVector as c, dot as d, clampVector as e, distance2BetweenPoints as f, solveLinearSystem as g, hsv2rgb as h, isNan as i, cross as j, add as k, normalize as l, multiplyAccumulate as m, norm as n, determinant2x2 as o, invertMatrix as p, jacobiN as q, radiansFromDegrees as r, subtract as s, perpendiculars as t, uninitializeBounds as u, vtkMath$1 as v, jacobi as w, multiplyScalar as x, random as y, determinant3x3 as z };
|
package/Common/Core/Math.d.ts
CHANGED
|
@@ -1074,6 +1074,13 @@ export function createUninitializedBounds(): Bounds;
|
|
|
1074
1074
|
*/
|
|
1075
1075
|
export function getMajorAxisIndex(vector: number[]): number;
|
|
1076
1076
|
|
|
1077
|
+
/**
|
|
1078
|
+
* Return the index of the component with the smallest absolute value.
|
|
1079
|
+
* Returns -1 for empty arrays.
|
|
1080
|
+
* @param {Number[]} vector
|
|
1081
|
+
*/
|
|
1082
|
+
export function getMinorAxisIndex(vector: number[]): number;
|
|
1083
|
+
|
|
1077
1084
|
/**
|
|
1078
1085
|
* Return the closest orthogonal matrix of 1, -1 and 0
|
|
1079
1086
|
* It works for both column major and row major matrices
|
|
@@ -1244,6 +1251,7 @@ export declare const vtkMath: {
|
|
|
1244
1251
|
isInf: typeof isInf;
|
|
1245
1252
|
createUninitializedBounds: typeof createUninitializedBounds;
|
|
1246
1253
|
getMajorAxisIndex: typeof getMajorAxisIndex;
|
|
1254
|
+
getMinorAxisIndex: typeof getMinorAxisIndex;
|
|
1247
1255
|
getSparseOrthogonalMatrix: typeof getSparseOrthogonalMatrix;
|
|
1248
1256
|
floatToHex2: typeof floatToHex2;
|
|
1249
1257
|
floatRGB2HexCode: typeof floatRGB2HexCode;
|
package/Common/Core/Math.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'seedrandom';
|
|
2
2
|
import '../../macros2.js';
|
|
3
3
|
import './Math/Constants.js';
|
|
4
|
-
export { ar as LUFactor3x3, as as LUSolve3x3, a0 as Pi, k as add, Z as angleBetweenVectors, W as areBoundsInitialized, E as areEquals, a as areMatricesEqual, a5 as arrayMax, a4 as arrayMin, G as arrayRange, a9 as beginCombination, a8 as binomial, aV as boundsIsWithinOtherBounds, a1 as ceil, a6 as ceilLog2, aR as clampAndNormalizeValue, F as clampValue, e as clampVector, aq as columnsToMat3, ap as columnsToMat4, aQ as computeBoundsFromPoints, $ as createArray, I as createUninitializedBounds, j as cross, b as default, B as degreesFromRadians, o as determinant2x2, z as determinant3x3, aF as diagonalize3x3, f as distance2BetweenPoints, d as dot, ai as dot2D, aJ as estimateMatrixCondition, aU as extentIsWithinOtherExtent, a7 as factorial,
|
|
4
|
+
export { ar as LUFactor3x3, as as LUSolve3x3, a0 as Pi, k as add, Z as angleBetweenVectors, W as areBoundsInitialized, E as areEquals, a as areMatricesEqual, a5 as arrayMax, a4 as arrayMin, G as arrayRange, a9 as beginCombination, a8 as binomial, aV as boundsIsWithinOtherBounds, a1 as ceil, a6 as ceilLog2, aR as clampAndNormalizeValue, F as clampValue, e as clampVector, aq as columnsToMat3, ap as columnsToMat4, aQ as computeBoundsFromPoints, $ as createArray, I as createUninitializedBounds, j as cross, b as default, B as degreesFromRadians, o as determinant2x2, z as determinant3x3, aF as diagonalize3x3, f as distance2BetweenPoints, d as dot, ai as dot2D, aJ as estimateMatrixCondition, aU as extentIsWithinOtherExtent, a7 as factorial, b2 as float2CssRGBA, X as floatRGB2HexCode, b1 as floatToHex2, M as floor, ad as gaussian, ak as gaussianAmplitude, al as gaussianWeight, aT as getAdjustedScalarRange, H as getMajorAxisIndex, b0 as getMinorAxisIndex, aS as getScalarTypeFittingRange, ac as getSeed, V as getSparseOrthogonalMatrix, aM as hex2float, h as hsv2rgb, K as identity, ax as identity3x3, aY as inf, aw as invert3x3, p as invertMatrix, a_ as isFinite, ay as isIdentity, az as isIdentity3x3, N as isInf, a$ as isNaN, i as isNan, Y as isPowerOfTwo, w as jacobi, q as jacobiN, Q as lab2rgb, aN as lab2xyz, C as ldexp, at as linearSolve3x3, aH as luFactorLinearSystem, aI as luSolveLinearSystem, aC as matrix3x3ToQuaternion, a3 as max, a2 as min, au as multiply3x3_mat3, U as multiply3x3_vect3, m as multiplyAccumulate, af as multiplyAccumulate2D, L as multiplyMatrix, aD as multiplyQuaternion, x as multiplyScalar, ae as multiplyScalar2D, T as nearestPowerOfTwo, aZ as negInf, aa as nextCombination, n as norm, an as norm2D, l as normalize, S as normalize2D, J as normalize4D, aE as orthogonalize3x3, ag as outer, am as outer2D, t as perpendiculars, aW as pointIsWithinBounds, ah as projectVector, aj as projectVector2D, aA as quaternionToMatrix3x3, r as radiansFromDegrees, y as random, ab as randomSeed, O as rgb2hsv, P as rgb2lab, aP as rgb2xyz, R as round, aB as roundNumber, c as roundVector, A as rowsToMat3, ao as rowsToMat4, _ as signedAngleBetweenVectors, aG as singularValueDecomposition3x3, aX as solve3PointCircle, aK as solveHomogeneousLeastSquares, aL as solveLeastSquares, g as solveLinearSystem, s as subtract, av as transpose3x3, u as uninitializeBounds, aO as xyz2lab, D as xyz2rgb } from './Math/index.js';
|
|
@@ -2,7 +2,6 @@ import { m as macro } from '../../macros2.js';
|
|
|
2
2
|
import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
|
|
3
3
|
import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
4
4
|
import { b as vtkMath } from '../../Common/Core/Math/index.js';
|
|
5
|
-
import { AttributeTypes } from '../../Common/DataModel/DataSetAttributes/Constants.js';
|
|
6
5
|
import vtkPoints from '../../Common/Core/Points.js';
|
|
7
6
|
import vtkPolyData from '../../Common/DataModel/PolyData.js';
|
|
8
7
|
import vtkTriangle from '../../Common/DataModel/Triangle.js';
|
|
@@ -484,8 +483,7 @@ function vtkWindowedSincPolyDataFilter(publicAPI, model) {
|
|
|
484
483
|
numberOfComponents: 1,
|
|
485
484
|
values: newScalars
|
|
486
485
|
});
|
|
487
|
-
|
|
488
|
-
output.getPointData().setActiveAttribute(idx, AttributeTypes.SCALARS);
|
|
486
|
+
output.getPointData().setScalars(newScalarsArray);
|
|
489
487
|
}
|
|
490
488
|
if (model.generateErrorVectors) {
|
|
491
489
|
const newVectors = new Float32Array(3 * numPts);
|
|
@@ -513,7 +511,7 @@ function vtkWindowedSincPolyDataFilter(publicAPI, model) {
|
|
|
513
511
|
if (!input) {
|
|
514
512
|
return;
|
|
515
513
|
}
|
|
516
|
-
const output = outData[0]
|
|
514
|
+
const output = outData[0] || vtkPolyData.newInstance();
|
|
517
515
|
const outputPoints = publicAPI.vtkWindowedSincPolyDataFilterExecute(input.getPoints(), input, output);
|
|
518
516
|
output.setPointData(input.getPointData());
|
|
519
517
|
output.setCellData(input.getCellData());
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { vtkAlgorithm, vtkObject } from './../../interfaces';
|
|
2
|
+
import { Vector3 } from './../../types';
|
|
3
|
+
|
|
4
|
+
export type IGenerateTCoords =
|
|
5
|
+
| 'TCOORDS_OFF'
|
|
6
|
+
| 'TCOORDS_FROM_SCALARS'
|
|
7
|
+
| 'TCOORDS_FROM_LENGTH'
|
|
8
|
+
| 'TCOORDS_FROM_NORMALIZED_LENGTH';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export interface IRibbonFilterInitialValues {
|
|
14
|
+
useDefaultNormal?: boolean;
|
|
15
|
+
width?: number;
|
|
16
|
+
varyWidth?: boolean;
|
|
17
|
+
angle?: number;
|
|
18
|
+
generateTCoords?: IGenerateTCoords;
|
|
19
|
+
widthFactor?: number;
|
|
20
|
+
textureLength?: number;
|
|
21
|
+
defaultNormal?: Vector3;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type vtkRibbonFilterBase = vtkObject & vtkAlgorithm;
|
|
25
|
+
|
|
26
|
+
export interface vtkRibbonFilter extends vtkRibbonFilterBase {
|
|
27
|
+
/**
|
|
28
|
+
* Get the angle (in degrees) of rotation about the line tangent used to
|
|
29
|
+
* orient the ribbon.
|
|
30
|
+
*/
|
|
31
|
+
getAngle(): number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get the default normal used to orient the ribbon when no normals are
|
|
35
|
+
* provided in the input.
|
|
36
|
+
*/
|
|
37
|
+
getDefaultNormal(): Vector3;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Get the default normal used to orient the ribbon when no normals are
|
|
41
|
+
* provided in the input.
|
|
42
|
+
*/
|
|
43
|
+
getDefaultNormalByReference(): Vector3;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Get the method used to generate texture coordinates.
|
|
47
|
+
*/
|
|
48
|
+
getGenerateTCoords(): IGenerateTCoords;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Get the method used to generate texture coordinates as a string.
|
|
52
|
+
*/
|
|
53
|
+
getGenerateTCoordsAsString(): string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get the texture length, used when generating texture coordinates from
|
|
57
|
+
* length.
|
|
58
|
+
*/
|
|
59
|
+
getTextureLength(): number;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Get whether to use the default normal to orient the ribbon when no
|
|
63
|
+
* normals are provided in the input.
|
|
64
|
+
*/
|
|
65
|
+
getUseDefaultNormal(): boolean;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Get whether to vary the width of the ribbon using scalar data.
|
|
69
|
+
*/
|
|
70
|
+
getVaryWidth(): boolean;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Get the width of the ribbon.
|
|
74
|
+
*/
|
|
75
|
+
getWidth(): number;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Get the width factor, used to scale the width when varying the width.
|
|
79
|
+
*/
|
|
80
|
+
getWidthFactor(): number;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @param inData
|
|
85
|
+
* @param outData
|
|
86
|
+
*/
|
|
87
|
+
requestData(inData: any, outData: any): void;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Set the angle (in degrees) of rotation about the line tangent used to orient the ribbon.
|
|
91
|
+
* Default is 0.0.
|
|
92
|
+
* @param angle The angle in degrees.
|
|
93
|
+
* @returns true if the angle is set successfully.
|
|
94
|
+
*/
|
|
95
|
+
setAngle(angle: number): boolean;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Set the default normal used to orient the ribbon when no normals are provided in the input.
|
|
99
|
+
* The default normal is a vector defined by three components (x,y,z). The
|
|
100
|
+
* default is (0,0,1).
|
|
101
|
+
* @param defaultNormal The default normal as an array of three numbers or a Vector3.
|
|
102
|
+
* @returns true if the default normal is set successfully.
|
|
103
|
+
*/
|
|
104
|
+
setDefaultNormal(defaultNormal: Vector3): boolean;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Set the default normal used to orient the ribbon when no normals are provided in the input.
|
|
108
|
+
* The default normal is a vector defined by three components (x,y,z). The
|
|
109
|
+
* default is (0,0,1).
|
|
110
|
+
* @returns true if the default normal is set successfully.
|
|
111
|
+
*/
|
|
112
|
+
setDefaultNormalFrom(defaultNormal: Vector3): boolean;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Set the method used to generate texture coordinates. By default, texture
|
|
116
|
+
* coordinates are not generated.
|
|
117
|
+
* @param generateTCoords The method to generate texture coordinates.
|
|
118
|
+
* @returns true if the method is set successfully.
|
|
119
|
+
*/
|
|
120
|
+
setGenerateTCoords(generateTCoords: IGenerateTCoords): boolean;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Set the texture length, used when generating texture coordinates from length.
|
|
124
|
+
* The default is 1.0.
|
|
125
|
+
* @param textureLength The texture length.
|
|
126
|
+
* @returns true if the texture length is set successfully.
|
|
127
|
+
*/
|
|
128
|
+
setTextureLength(textureLength: number): boolean;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Set whether to use the default normal to orient the ribbon when no normals are provided in the input.
|
|
132
|
+
* The default is false.
|
|
133
|
+
* @param useDefaultNormal Whether to use the default normal.
|
|
134
|
+
* @returns true if the flag is set successfully.
|
|
135
|
+
*/
|
|
136
|
+
setUseDefaultNormal(useDefaultNormal: boolean): boolean;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Set whether to vary the width of the ribbon using scalar data. By default,
|
|
140
|
+
* the width of the ribbon is uniform.
|
|
141
|
+
* @param varyWidth Whether to vary the width of the ribbon.
|
|
142
|
+
* @returns true if the flag is set successfully.
|
|
143
|
+
*/
|
|
144
|
+
setVaryWidth(varyWidth: boolean): boolean;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Set the width of the ribbon. The width is the total width of the ribbon;
|
|
148
|
+
* the ribbon extends width/2 on either side of the line. The default is 0.5.
|
|
149
|
+
* @param width The width of the ribbon.
|
|
150
|
+
* @returns true if the width is set successfully.
|
|
151
|
+
*/
|
|
152
|
+
setWidth(width: number): boolean;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Set the width factor, used to scale the width when varying the width.
|
|
156
|
+
* The default is 1.0.
|
|
157
|
+
* @param widthFactor The width factor.
|
|
158
|
+
* @returns true if the width factor is set successfully.
|
|
159
|
+
*/
|
|
160
|
+
setWidthFactor(widthFactor: number): boolean;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Method used to decorate a given object (publicAPI+model) with vtkRibbonFilter characteristics.
|
|
165
|
+
*
|
|
166
|
+
* @param publicAPI object on which methods will be bounds (public)
|
|
167
|
+
* @param model object on which data structure will be bounds (protected)
|
|
168
|
+
* @param {IRibbonFilterInitialValues} [initialValues] (default: {})
|
|
169
|
+
*/
|
|
170
|
+
export function extend(
|
|
171
|
+
publicAPI: object,
|
|
172
|
+
model: object,
|
|
173
|
+
initialValues?: IRibbonFilterInitialValues
|
|
174
|
+
): void;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Method used to create a new instance of vtkRibbonFilter
|
|
178
|
+
* @param {IRibbonFilterInitialValues} [initialValues] for pre-setting some of its content
|
|
179
|
+
*/
|
|
180
|
+
export function newInstance(
|
|
181
|
+
initialValues?: IRibbonFilterInitialValues
|
|
182
|
+
): vtkRibbonFilter;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* vtkRibbonFilter is a filter to create oriented ribbons from lines defined in
|
|
186
|
+
* polygonal dataset. The orientation of the ribbon is along the line segments
|
|
187
|
+
* and perpendicular to "projected" line normals. Projected line normals are the
|
|
188
|
+
* original line normals projected to be perpendicular to the local line
|
|
189
|
+
* segment. An offset angle can be specified to rotate the ribbon with respect
|
|
190
|
+
* to the normal.
|
|
191
|
+
*/
|
|
192
|
+
export declare const vtkRibbonFilter: {
|
|
193
|
+
newInstance: typeof newInstance;
|
|
194
|
+
extend: typeof extend;
|
|
195
|
+
};
|
|
196
|
+
export default vtkRibbonFilter;
|