|
| 1 | +import { Bounds, Vector3 } from '../../../types'; |
| 2 | +import vtkDataArray from '../../Core/DataArray'; |
| 3 | +import vtkImplicitFunction from '../ImplicitFunction'; |
| 4 | +import vtkPlane from '../Plane'; |
| 5 | +import vtkPoints from '../../Core/Points'; |
| 6 | + |
| 7 | +/** |
| 8 | + * |
| 9 | + */ |
| 10 | +export interface IPlanesInitialValues { |
| 11 | + points?: vtkPoints; |
| 12 | + normals?: vtkDataArray; |
| 13 | + bounds?: Bounds; |
| 14 | + planes?: number[]; |
| 15 | +} |
| 16 | + |
| 17 | +export interface vtkPlanes extends vtkImplicitFunction { |
| 18 | + /** |
| 19 | + * Evaluate the function at a point x |
| 20 | + * @param x The point at which to evaluate the function |
| 21 | + * @returns The function value at the point x |
| 22 | + */ |
| 23 | + evaluateFunction(x: Vector3): number; |
| 24 | + |
| 25 | + /** |
| 26 | + * Evaluate the gradient at a point x |
| 27 | + * @param x The point at which to evaluate the gradient |
| 28 | + * @returns The gradient at the point x |
| 29 | + */ |
| 30 | + evaluateGradient(x: Vector3): Vector3; |
| 31 | + |
| 32 | + /** |
| 33 | + * Get the bounds of the planes. |
| 34 | + * @returns {Bounds} The bounds of the planes. |
| 35 | + */ |
| 36 | + getBounds(): Bounds; |
| 37 | + |
| 38 | + /** |
| 39 | + * Get the number of planes in the set of planes. |
| 40 | + */ |
| 41 | + getNumberOfPlanes(): number; |
| 42 | + |
| 43 | + /** |
| 44 | + * Get the normals of the plane. |
| 45 | + * @returns {vtkDataArray} The normals of the plane. |
| 46 | + */ |
| 47 | + getNormals(): vtkDataArray; |
| 48 | + |
| 49 | + /** |
| 50 | + * Get the points of the plane. |
| 51 | + * @returns {vtkPoints} The points of the plane. |
| 52 | + */ |
| 53 | + getPoints(): vtkPoints; |
| 54 | + |
| 55 | + /** |
| 56 | + * Get the i-th plane |
| 57 | + * @param {Number} i The index of the plane to get. |
| 58 | + * @param {vtkPlane} [plane] The vtkPlane instance to fill (optional). |
| 59 | + * @returns {vtkPlane} The plane instance at the specified index. |
| 60 | + * If no plane is provided, a new vtkPlane instance will be created. |
| 61 | + */ |
| 62 | + getPlane(i: number, plane?: vtkPlane): vtkPlane; |
| 63 | + |
| 64 | + /** |
| 65 | + * Set the bounds of the planes. |
| 66 | + * @param {Bounds} bounds The bounds to set. |
| 67 | + * @returns {Boolean} true if bounds were set, false if they were already set |
| 68 | + * @see getBounds |
| 69 | + */ |
| 70 | + setBounds(bounds: Bounds): boolean; |
| 71 | + |
| 72 | + /** |
| 73 | + * Set the Frustum planes. |
| 74 | + * @param {Vector3[]} planes The coordinates of the frustum planes. |
| 75 | + */ |
| 76 | + setFrustumPlanes(planes: Vector3[]): boolean; |
| 77 | + |
| 78 | + /** |
| 79 | + * Set the normals of the plane. |
| 80 | + * @param {vtkDataArray} normals The normals to set. |
| 81 | + */ |
| 82 | + setNormals(normals: vtkDataArray): boolean; |
| 83 | + |
| 84 | + /** |
| 85 | + * Set the points of the plane. |
| 86 | + * @param points The points to set. |
| 87 | + */ |
| 88 | + setPoints(points: vtkPoints): boolean; |
| 89 | +} |
| 90 | + |
| 91 | +/** |
| 92 | + * Method used to decorate a given object (publicAPI+model) with vtkPlane characteristics. |
| 93 | + * |
| 94 | + * @param publicAPI object on which methods will be bounds (public) |
| 95 | + * @param model object on which data structure will be bounds (protected) |
| 96 | + * @param {IPlanesInitialValues} [initialValues] (default: {}) |
| 97 | + */ |
| 98 | +export function extend( |
| 99 | + publicAPI: object, |
| 100 | + model: object, |
| 101 | + initialValues?: IPlanesInitialValues |
| 102 | +): void; |
| 103 | + |
| 104 | +/** |
| 105 | + * Method used to create a new instance of vtkPlane. |
| 106 | + * @param {IPlanesInitialValues} [initialValues] for pre-setting some of its content |
| 107 | + */ |
| 108 | +export function newInstance(initialValues?: IPlanesInitialValues): vtkPlanes; |
| 109 | + |
| 110 | + |
| 111 | +/** |
| 112 | + * vtkPlanes is a class that represents a set of planes in 3D space. |
| 113 | + * It extends the vtkImplicitFunction class and provides methods to evaluate functions and gradients at points, |
| 114 | + * set origins and normals, and manage the planes. |
| 115 | + */ |
| 116 | +export declare const vtkPlanes: { |
| 117 | + newInstance: typeof newInstance; |
| 118 | + extend: typeof extend; |
| 119 | +}; |
| 120 | +export default vtkPlanes; |
0 commit comments