forked from Kitware/vtk-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Kitware#1849 from daker/add-ts-datamodel
docs(ts): add more typescript definitions for DataModels
- Loading branch information
Showing
20 changed files
with
867 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import vtkSpline1D from 'vtk.js/Sources/Common/DataModel/Spline1D'; | ||
|
||
|
||
interface ICardinalSpline1DInitialValues {} | ||
|
||
export interface vtkCardinalSpline1D extends vtkSpline1D { | ||
|
||
/** | ||
* | ||
* @param {Number} size | ||
* @param {Float32Array} work | ||
* @param {Number[]} x | ||
* @param {Number[]} y | ||
*/ | ||
computeCloseCoefficients(size: number, work: Float32Array, x: number[], y: number[]): void; | ||
|
||
/** | ||
* | ||
* @param {Number} size | ||
* @param {Float32Array} work | ||
* @param {Number[]} x | ||
* @param {Number[]} y | ||
*/ | ||
computeOpenCoefficients(size: number, work: Float32Array, x: number[], y: number[]): void; | ||
|
||
/** | ||
* | ||
* @param {Number} intervalIndex | ||
* @param {Number} t | ||
*/ | ||
getValue(intervalIndex: number, t: number): number; | ||
} | ||
|
||
/** | ||
* Method used to decorate a given object (publicAPI+model) with vtkCardinalSpline1D characteristics. | ||
* | ||
* @param publicAPI object on which methods will be bounds (public) | ||
* @param model object on which data structure will be bounds (protected) | ||
* @param {ICardinalSpline1DInitialValues} [initialValues] (default: {}) | ||
*/ | ||
export function extend(publicAPI: object, model: object, initialValues?: ICardinalSpline1DInitialValues): void; | ||
|
||
/** | ||
* Method used to create a new instance of vtkCardinalSpline1D. | ||
* @param {ICardinalSpline1DInitialValues} [initialValues] for pre-setting some of its content | ||
*/ | ||
export function newInstance(initialValues?: ICardinalSpline1DInitialValues): vtkCardinalSpline1D; | ||
|
||
/** | ||
* vtkCardinalSpline1D provides methods for creating a 1D cubic spline object from given | ||
* parameters, and allows for the calculation of the spline value and derivative | ||
* at any given point inside the spline intervals. | ||
*/ | ||
export declare const vtkCardinalSpline1D: { | ||
newInstance: typeof newInstance, | ||
extend: typeof extend | ||
}; | ||
export default vtkCardinalSpline1D; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { VtkObject } from 'vtk.js/Sources/macro'; | ||
|
||
|
||
interface IConeInitialValues { | ||
angle?: number; | ||
} | ||
|
||
export interface vtkCone extends VtkObject { | ||
|
||
/** | ||
* Given the point x evaluate the cone equation. | ||
* @param {Number[]} x The point coordinate. | ||
*/ | ||
evaluateFunction(x: number[]): number[]; | ||
|
||
/** | ||
* Given the point x evaluate the equation for the cone gradient. | ||
* @param {Number[]} x The point coordinate. | ||
*/ | ||
evaluateGradient(x: number[]): number[]; | ||
|
||
/** | ||
* Get the angle of the cone. | ||
*/ | ||
getAngle(): number; | ||
|
||
/** | ||
* Set the value representing the angle of the cone. | ||
* @param {Number} angle The angle of the cone. | ||
*/ | ||
setAngle(angle: number): boolean; | ||
} | ||
|
||
/** | ||
* Method used to decorate a given object (publicAPI+model) with vtkCone characteristics. | ||
* | ||
* @param publicAPI object on which methods will be bounds (public) | ||
* @param model object on which data structure will be bounds (protected) | ||
* @param {IConeInitialValues} [initialValues] (default: {}) | ||
*/ | ||
export function extend(publicAPI: object, model: object, initialValues?: IConeInitialValues): void; | ||
|
||
/** | ||
* Method used to create a new instance of vtkCone. | ||
* @param {IConeInitialValues} [initialValues] for pre-setting some of its content | ||
*/ | ||
export function newInstance(initialValues?: IConeInitialValues): vtkCone; | ||
|
||
/** | ||
* vtkCone computes the implicit function and/or gradient for a cone. vtkCone is | ||
* a concrete implementation of vtkImplicitFunction. TODO: Currently the cone's | ||
* axis of rotation is along the x-axis with the apex at the origin. To | ||
* transform this to a different location requires the application of a | ||
* transformation matrix. This can be performed by supporting transforms at the | ||
* implicit function level, and should be added. | ||
*/ | ||
export declare const vtkCone: { | ||
newInstance: typeof newInstance, | ||
extend: typeof extend; | ||
}; | ||
export default vtkCone; |
Oops, something went wrong.