|
| 1 | +import { DesiredOutputPrecision } from '../../../Common/DataModel/DataSetAttributes'; |
| 2 | +import { vtkAlgorithm, vtkObject } from '../../../interfaces'; |
| 3 | +import { Vector3 } from '../../../types'; |
| 4 | + |
| 5 | +/** |
| 6 | + * |
| 7 | + */ |
| 8 | +export interface IEllipseArcSourceInitialValues { |
| 9 | + center?: Vector3; |
| 10 | + normal?: Vector3; |
| 11 | + majorRadiusVector?: Vector3; |
| 12 | + startAngle?: number; |
| 13 | + segmentAngle?: number; |
| 14 | + resolution?: number; |
| 15 | + close?: boolean; |
| 16 | + outputPointsPrecision?: DesiredOutputPrecision; |
| 17 | + ratio?: number; |
| 18 | +} |
| 19 | + |
| 20 | +type vtkEllipseArcSourceBase = vtkObject & |
| 21 | + Omit< |
| 22 | + vtkAlgorithm, |
| 23 | + | 'getInputData' |
| 24 | + | 'setInputData' |
| 25 | + | 'setInputConnection' |
| 26 | + | 'getInputConnection' |
| 27 | + | 'addInputConnection' |
| 28 | + | 'addInputData' |
| 29 | + >; |
| 30 | + |
| 31 | +export interface vtkEllipseArcSource extends vtkEllipseArcSourceBase { |
| 32 | + /** |
| 33 | + * Get whether the arc is closed. |
| 34 | + */ |
| 35 | + getClose(): boolean; |
| 36 | + |
| 37 | + /** |
| 38 | + * Get the center of the arc. |
| 39 | + */ |
| 40 | + getCenter(): Vector3; |
| 41 | + |
| 42 | + /** |
| 43 | + * Get the center of the arc by reference. |
| 44 | + */ |
| 45 | + getCenterByReference(): Vector3; |
| 46 | + |
| 47 | + /** |
| 48 | + * Get the major radius vector of the arc. |
| 49 | + */ |
| 50 | + getMajorRadiusVector(): Vector3; |
| 51 | + |
| 52 | + /** |
| 53 | + * Get the major radius vector of the arc by reference. |
| 54 | + */ |
| 55 | + getMajorRadiusVectorByReference(): Vector3; |
| 56 | + |
| 57 | + /** |
| 58 | + * Get the normal vector of the arc. |
| 59 | + */ |
| 60 | + getNormal(): Vector3; |
| 61 | + |
| 62 | + /** |
| 63 | + * Get the normal vector of the arc by reference. |
| 64 | + */ |
| 65 | + getNormalByReference(): Vector3; |
| 66 | + |
| 67 | + /** |
| 68 | + * Get the output points precision. |
| 69 | + */ |
| 70 | + getOutputPointsPrecision(): DesiredOutputPrecision; |
| 71 | + |
| 72 | + /** |
| 73 | + * Get the ratio of the arc. |
| 74 | + */ |
| 75 | + getRatio(): number; |
| 76 | + |
| 77 | + /** |
| 78 | + * Get the resolution of the arc. |
| 79 | + */ |
| 80 | + getResolution(): number; |
| 81 | + |
| 82 | + /** |
| 83 | + * Get the segment angle of the arc. |
| 84 | + */ |
| 85 | + getSegmentAngle(): number; |
| 86 | + |
| 87 | + /** |
| 88 | + * Get the start angle of the arc. |
| 89 | + */ |
| 90 | + getStartAngle(): number; |
| 91 | + |
| 92 | + /** |
| 93 | + * |
| 94 | + * @param inData |
| 95 | + * @param outData |
| 96 | + */ |
| 97 | + requestData(inData: any, outData: any): void; |
| 98 | + |
| 99 | + /** |
| 100 | + * Set whether the arc is closed. |
| 101 | + * @param {Boolean} close Whether the arc is closed. |
| 102 | + */ |
| 103 | + setClose(close: boolean): boolean; |
| 104 | + |
| 105 | + /** |
| 106 | + * Set the center of the arc. |
| 107 | + * @param {Vector3} center The center's coordinates. |
| 108 | + */ |
| 109 | + setCenter(center: Vector3): boolean; |
| 110 | + |
| 111 | + /** |
| 112 | + * Set the center of the arc by reference. |
| 113 | + * @param {Vector3} center The center's coordinates. |
| 114 | + */ |
| 115 | + setCenterFrom(center: Vector3): boolean; |
| 116 | + |
| 117 | + /** |
| 118 | + * Set the major radius vector of the arc. |
| 119 | + * @param {Vector3} majorRadiusVector The major radius vector's coordinates. |
| 120 | + */ |
| 121 | + setMajorRadiusVector(majorRadiusVector: Vector3): boolean; |
| 122 | + |
| 123 | + /** |
| 124 | + * Set the major radius vector of the arc by reference. |
| 125 | + * @param {Vector3} majorRadiusVector The major radius vector's coordinates. |
| 126 | + */ |
| 127 | + setMajorRadiusVectorFrom(majorRadiusVector: Vector3): boolean; |
| 128 | + |
| 129 | + /** |
| 130 | + * Set the normal vector of the arc. |
| 131 | + * @param {Vector3} normal The normal vector's coordinates. |
| 132 | + */ |
| 133 | + setNormal(normal: Vector3): boolean; |
| 134 | + |
| 135 | + /** |
| 136 | + * Set the normal vector of the arc by reference. |
| 137 | + * @param {Vector3} normal The normal vector's coordinates. |
| 138 | + */ |
| 139 | + setNormalFrom(normal: Vector3): boolean; |
| 140 | + |
| 141 | + /** |
| 142 | + * Set the output points precision. |
| 143 | + * @param {DesiredOutputPrecision} precision The desired output precision. |
| 144 | + */ |
| 145 | + setOutputPointsPrecision(precision: DesiredOutputPrecision): boolean; |
| 146 | + |
| 147 | + /** |
| 148 | + * Set the ratio of the arc. |
| 149 | + * @param {Number} ratio The ratio of the arc. |
| 150 | + */ |
| 151 | + setRatio(ratio: number): boolean; |
| 152 | + |
| 153 | + /** |
| 154 | + * Set the resolution of the arc. |
| 155 | + * @param {Number} resolution The number of points in the arc. |
| 156 | + */ |
| 157 | + setResolution(resolution: number): boolean; |
| 158 | + |
| 159 | + /** |
| 160 | + * Set the segment angle of the arc. |
| 161 | + * @param {Number} segmentAngle The segment angle in degrees. |
| 162 | + */ |
| 163 | + setSegmentAngle(segmentAngle: number): boolean; |
| 164 | + |
| 165 | + /** |
| 166 | + * Set the start angle of the arc. |
| 167 | + * @param {Number} startAngle The start angle in degrees. |
| 168 | + */ |
| 169 | + setStartAngle(startAngle: number): boolean; |
| 170 | +} |
| 171 | + |
| 172 | +/** |
| 173 | + * Method used to decorate a given object (publicAPI+model) with |
| 174 | + * vtkEllipseArcSource characteristics. |
| 175 | + * |
| 176 | + * @param publicAPI object on which methods will be bounds (public) |
| 177 | + * @param model object on which data structure will be bounds (protected) |
| 178 | + * @param {IEllipseArcSourceInitialValues} [initialValues] (default: {}) |
| 179 | + */ |
| 180 | +export function extend( |
| 181 | + publicAPI: object, |
| 182 | + model: object, |
| 183 | + initialValues?: IEllipseArcSourceInitialValues |
| 184 | +): void; |
| 185 | + |
| 186 | +/** |
| 187 | + * Method used to create a new instance of vtkEllipseArcSource. |
| 188 | + * @param {IEllipseArcSourceInitialValues} [initialValues] for pre-setting some of its content |
| 189 | + */ |
| 190 | +export function newInstance( |
| 191 | + initialValues?: IEllipseArcSourceInitialValues |
| 192 | +): vtkEllipseArcSource; |
| 193 | + |
| 194 | +/** |
| 195 | + * vtkEllipseArcSource is a source object that creates an elliptical arc defined |
| 196 | + * by a normal, a center and the major radius vector. You can define an angle to |
| 197 | + * draw only a section of the ellipse. The number of segments composing the |
| 198 | + * polyline is controlled by setting the object resolution. |
| 199 | + * |
| 200 | + * @example |
| 201 | + * ```js |
| 202 | + * import vtkEllipseArcSource from '@kitware/vtk.js/Filters/Sources/EllipseArcSource'; |
| 203 | + * |
| 204 | + * const arc = vtkEllipseArcSource.newInstance(); |
| 205 | + * const polydata = arc.getOutputData(); |
| 206 | + * ``` |
| 207 | + */ |
| 208 | +export declare const vtkEllipseArcSource: { |
| 209 | + newInstance: typeof newInstance; |
| 210 | + extend: typeof extend; |
| 211 | +}; |
| 212 | +export default vtkEllipseArcSource; |
0 commit comments