import { Data3DTexture, type TextureDataType } from "three"; import { type IData3D } from "image-tls"; import { Axis, type IVector3 } from "type-tls"; /** * 3D数据纹理 * @remarks * 专门用于 {@link ./GradientVolumeMaterial#GradientVolumeMaterial} 的纹理对象 * 提供了一些与 {@link ./GradientVolumeMaterial#GradientVolumeMaterial} 约定的设置 和 一些便利方法 */ export declare class GradientData3DTexture extends Data3DTexture { readonly isGradientData3DTexture = true; constructor(data: BufferSource, width: number, height: number, depth: number, type?: TextureDataType); /** * 获取3D数据的切片 * @remarks * 切片就是指定轴的指定位置的垂直截面 * @param axis - 轴 * @param depth - 在轴上的坐标值 * @returns */ getData3DSlice(axis: Axis, depth: number): import("image-tls").IData2D; /** * 获取3D数据中指定坐标处的数据项目 * @remarks * 在 ImageData3DTexture 中,与 {@link ImageData3DTexture.getColor} 返回的值一样; * @param coord * @returns */ getItem(coord: IVector3): number[]; /** * 获取3D数据中指定坐标处的值 * @param coord - 坐标 * @returns */ getValue(coord: IVector3): number; } export interface CreateGradientData3DTextureOptions { /** * 表示为空的值 * @remarks * 在转换时 IData3D 时,当遇到值为 undefined 或 null 的值时,就会使 voidValue 来替换; * * IData3D 中,可以通过 undefined 或 null 来表示空,但在将 IData3D 转为 Data3DTexture 时,所有的item都必须是数字,所以这时就需要为空约定一个数字; * * @defaultValue 0 */ voidValue?: number; /** * 3D数据中包含的数值是否是 uint8 类型的 * @defaultValue false */ uint8?: boolean; } /** * 创建梯度 Data3DTexture * @param data3D - 3D数据 * @param options - 选项 * @returns */ export declare function createGradientData3DTexture(data3D: IData3D, options?: CreateGradientData3DTextureOptions): GradientData3DTexture; //# sourceMappingURL=GradientData3DTexture.d.ts.map