@thewtex/vtk.js-esm
Version:
Visualization Toolkit for the Web
159 lines (131 loc) • 3.07 kB
TypeScript
import { vtkObject, vtkSubscription } from '@kitware/vtk.js/interfaces';
import vtkActor from '@kitware/vtk.js/Rendering/Core/Actor';
interface IMTLReaderOptions {
binary?: boolean;
compression?: string;
progressCallback?: any;
}
/**
*
*/
interface IMTLReaderInitialValues {
numberOfOutputs?: number;
requestCount?: number;
materials?: object;
interpolateTextures?: boolean;
}
export interface vtkMTLReader extends vtkObject {
applyMaterialToActor(name: string, actor: vtkActor): void;
/**
*
*/
getBaseURL(): string;
/**
*
*/
getDataAccessHelper(): any;
/**
*
*/
getInterpolateTextures(): boolean;
/**
*
*/
getMaterial(name: string): object;
/**
*
*/
getMaterialNames(): object;
/**
*
*/
getSplitGroup(): boolean;
/**
* Get the url of the object to load.
*/
getUrl(): string;
/**
*
* @param {Boolean} busy
*/
invokeBusy(busy: boolean): void;
/**
*
*/
isBusy(): number;
/**
*
*/
listImages(): any;
/**
* Load the object data.
* @param {IMTLReaderOptions} [options]
*/
loadData(options?: IMTLReaderOptions): Promise<any>;
/**
*
* @param busy
*/
onBusy(busy: boolean): vtkSubscription;
/**
* Parse data as text.
* @param {String} content The content to parse.
*/
parseAsText(content: string): void;
/**
*
* @param inData
* @param outData
*/
requestData(inData: any, outData: any): void;
/**
*
* @param dataAccessHelper
*/
setDataAccessHelper(dataAccessHelper: any): boolean;
/**
*
* @param imagePath
* @param src
*/
setImageSrc(imagePath: string, src: string): any;
/**
*
* @param interpolateTextures
*/
setInterpolateTextures(interpolateTextures: boolean): boolean;
/**
*
* @param splitGroup
*/
setSplitGroup(splitGroup: boolean): boolean;
/**
* Set the url of the object to load.
* @param {String} url the url of the object to load.
* @param {IMTLReaderOptions} [option] The MTL reader options.
*/
setUrl(url: string, option?: IMTLReaderOptions): boolean;
}
/**
* Method used to decorate a given object (publicAPI+model) with vtkMTLReader characteristics.
*
* @param publicAPI object on which methods will be bounds (public)
* @param model object on which data structure will be bounds (protected)
* @param {IMTLReaderInitialValues} [initialValues] (default: {})
*/
export function extend(publicAPI: object, model: object, initialValues?: IMTLReaderInitialValues): void;
/**
* Method used to create a new instance of vtkMTLReader
* @param {IMTLReaderInitialValues} [initialValues] for pre-setting some of its content
*/
export function newInstance(initialValues?: IMTLReaderInitialValues): vtkMTLReader;
/**
* The vtkMTLReader aims to parse the MTL(Material Template Library file format
* which is a companion file format to .OBJ that describes surface shading
* (material) properties of objects within one or more .OBJ files.
*/
export declare const vtkMTLReader: {
newInstance: typeof newInstance;
extend: typeof extend;
}
export default vtkMTLReader;