Skip to content

Commit 79a15c7

Browse files
jmannaufloryst
authored andcommitted
feat: add ranges to create3DFilterableFromRaw
makes create3DFilterableFromRaw consistent with create2DFilterableFromRaw
1 parent 8c75878 commit 79a15c7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Sources/Rendering/OpenGL/Texture/index.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,10 @@ export interface vtkOpenGLTexture extends vtkViewNode {
301301
* @param dataType The data type of the texture.
302302
* @param values The raw data for the texture.
303303
* @param preferSizeOverAccuracy Whether to prefer texture size over accuracy.
304-
* @returns {boolean} True if the texture was successfully created, false otherwise.
304+
* @param [ranges] The precomputed ranges of the data (optional). Provided to
305+
* prevent computation of the data ranges.
306+
* @returns {boolean} True if the texture was successfully created, false
307+
* otherwise.
305308
*/
306309
create3DFilterableFromRaw(
307310
width: number,
@@ -310,7 +313,8 @@ export interface vtkOpenGLTexture extends vtkViewNode {
310313
numComps: number,
311314
dataType: VtkDataTypes,
312315
values: any,
313-
preferSizeOverAccuracy: boolean
316+
preferSizeOverAccuracy: boolean,
317+
ranges?: vtkRange[]
314318
): boolean;
315319

316320
/**

Sources/Rendering/OpenGL/Texture/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,8 @@ function vtkOpenGLTexture(publicAPI, model) {
15981598
numberOfComponents,
15991599
dataType,
16001600
values,
1601-
preferSizeOverAccuracy = false
1601+
preferSizeOverAccuracy = false,
1602+
ranges = undefined
16021603
) =>
16031604
publicAPI.create3DFilterableFromDataArray(
16041605
width,
@@ -1608,6 +1609,7 @@ function vtkOpenGLTexture(publicAPI, model) {
16081609
numberOfComponents,
16091610
dataType,
16101611
values,
1612+
ranges,
16111613
}),
16121614
preferSizeOverAccuracy
16131615
);

0 commit comments

Comments
 (0)