|
| 1 | +import { vtkAlgorithm, vtkObject } from '../../../interfaces'; |
| 2 | +import { Vector3 } from '../../../types'; |
| 3 | + |
| 4 | +/** |
| 5 | + * |
| 6 | + */ |
| 7 | +export interface IDiskSourceInitialValues { |
| 8 | + innerRadius?: number; |
| 9 | + outerRadius?: number; |
| 10 | + center?: Vector3; |
| 11 | + normal?: Vector3; |
| 12 | + radialResolution?: number; |
| 13 | + circumferentialResolution?: number; |
| 14 | + pointType?: string; |
| 15 | +} |
| 16 | + |
| 17 | +type vtkDiskSourceBase = vtkObject & |
| 18 | + Omit< |
| 19 | + vtkAlgorithm, |
| 20 | + | 'getInputData' |
| 21 | + | 'setInputData' |
| 22 | + | 'setInputConnection' |
| 23 | + | 'getInputConnection' |
| 24 | + | 'addInputConnection' |
| 25 | + | 'addInputData' |
| 26 | + >; |
| 27 | + |
| 28 | +export interface vtkDiskSource extends vtkDiskSourceBase { |
| 29 | + /** |
| 30 | + * Get the center of the disk. |
| 31 | + */ |
| 32 | + getCenter(): Vector3; |
| 33 | + |
| 34 | + /** |
| 35 | + * Get the circumferential resolution of the disk. |
| 36 | + */ |
| 37 | + getCircumferentialResolution(): number; |
| 38 | + |
| 39 | + /** |
| 40 | + * Get the inner radius of the disk. |
| 41 | + */ |
| 42 | + getInnerRadius(): number; |
| 43 | + |
| 44 | + /** |
| 45 | + * Get the normal of the disk. |
| 46 | + */ |
| 47 | + getNormal(): Vector3; |
| 48 | + |
| 49 | + /** |
| 50 | + * Get the outer radius of the disk. |
| 51 | + */ |
| 52 | + getOuterRadius(): number; |
| 53 | + |
| 54 | + /** |
| 55 | + * Get the point type used for the disk. |
| 56 | + */ |
| 57 | + getPointType(): string; |
| 58 | + |
| 59 | + /** |
| 60 | + * Get the radial resolution of the disk. |
| 61 | + */ |
| 62 | + getRadialResolution(): number; |
| 63 | + |
| 64 | + /** |
| 65 | + * Expose methods |
| 66 | + * @param inData |
| 67 | + * @param outData |
| 68 | + */ |
| 69 | + requestData(inData: any, outData: any): void; |
| 70 | + |
| 71 | + /** |
| 72 | + * Set the center of the disk. |
| 73 | + * @param {Vector3} center |
| 74 | + */ |
| 75 | + setCenter(center: Vector3): boolean; |
| 76 | + |
| 77 | + /** |
| 78 | + * Set the circumferential resolution of the disk. |
| 79 | + * @param {number} resolution |
| 80 | + */ |
| 81 | + setCircumferentialResolution(resolution: number): boolean; |
| 82 | + |
| 83 | + /** |
| 84 | + * Set the inner radius of the disk. |
| 85 | + * @param {number} radius |
| 86 | + */ |
| 87 | + setInnerRadius(radius: number): boolean; |
| 88 | + |
| 89 | + /** |
| 90 | + * Set the normal of the disk. |
| 91 | + * @param {Vector3} normal |
| 92 | + */ |
| 93 | + setNormal(normal: Vector3): boolean; |
| 94 | + |
| 95 | + /** |
| 96 | + * Set the outer radius of the disk. |
| 97 | + * @param {number} radius |
| 98 | + */ |
| 99 | + setOuterRadius(radius: number): boolean; |
| 100 | + |
| 101 | + /** |
| 102 | + * Set the point type used for the disk. |
| 103 | + * @param {string} type |
| 104 | + */ |
| 105 | + setPointType(type: string): boolean; |
| 106 | + |
| 107 | + /** |
| 108 | + * Set the radial resolution of the disk. |
| 109 | + * @param {number} resolution |
| 110 | + */ |
| 111 | + setRadialResolution(resolution: number): boolean; |
| 112 | +} |
| 113 | + |
| 114 | +/** |
| 115 | + * Method used to decorate a given object (publicAPI+model) with vtkDiskSource characteristics. |
| 116 | + * |
| 117 | + * @param publicAPI object on which methods will be bounds (public) |
| 118 | + * @param model object on which data structure will be bounds (protected) |
| 119 | + * @param {IDiskSourceInitialValues} [initialValues] (default: {}) |
| 120 | + */ |
| 121 | +export function extend( |
| 122 | + publicAPI: object, |
| 123 | + model: object, |
| 124 | + initialValues?: IDiskSourceInitialValues |
| 125 | +): void; |
| 126 | + |
| 127 | +/** |
| 128 | + * Method used to create a new instance of vtkDiskSource. |
| 129 | + * @param {IDiskSourceInitialValues} [initialValues] for pre-setting some of its content |
| 130 | + */ |
| 131 | +export function newInstance( |
| 132 | + initialValues?: IDiskSourceInitialValues |
| 133 | +): vtkDiskSource; |
| 134 | + |
| 135 | +/** |
| 136 | + * vtkDiskSource creates a polygonal disk with a hole in the center. The disk |
| 137 | + * has zero height. The user can specify the inner and outer radius of the disk, |
| 138 | + * the radial and circumferential resolution of the polygonal representation, |
| 139 | + * and the center and plane normal of the disk (i.e., the center and disk normal |
| 140 | + * control the position and orientation of the disk). |
| 141 | + * |
| 142 | + * @example |
| 143 | + * ```js |
| 144 | + * import vtkDiskSource from '@kitware/vtk.js/Filters/Sources/DiskSource'; |
| 145 | + * |
| 146 | + * const disk = vtkDiskSource.newInstance({ radius: 1, resolution: 80 }); |
| 147 | + * const polydata = disk.getOutputData(); |
| 148 | + * ``` |
| 149 | + */ |
| 150 | +export declare const vtkDiskSource: { |
| 151 | + newInstance: typeof newInstance; |
| 152 | + extend: typeof extend; |
| 153 | +}; |
| 154 | +export default vtkDiskSource; |
0 commit comments