|
| 1 | +import { vtkObject } from "../../../interfaces"; |
| 2 | +import { vtkOpenGLRenderWindow } from "../../../Rendering/OpenGL/RenderWindow" |
| 3 | +import { Vector3 } from "../../../types"; |
| 4 | + |
| 5 | +/** |
| 6 | + * |
| 7 | + */ |
| 8 | +export interface IAbstractManipulatorInitialValues { |
| 9 | + userOrigin?: Vector3; |
| 10 | + handleOrigin?: Vector3; |
| 11 | + widgetOrigin?: Vector3; |
| 12 | + userNormal?: Vector3; |
| 13 | + handleNormal?: Vector3; |
| 14 | + widgetNormal?: Vector3; |
| 15 | +} |
| 16 | + |
| 17 | +export interface vtkAbstractManipulator extends vtkObject { |
| 18 | + |
| 19 | + /** |
| 20 | + * Get the normal of the line |
| 21 | + */ |
| 22 | + getNormal(callData: any): Vector3; |
| 23 | + |
| 24 | + /** |
| 25 | + * Get the origin of the line |
| 26 | + */ |
| 27 | + getOrigin(callData: any): Vector3; |
| 28 | + |
| 29 | + /** |
| 30 | + * Get the value of useCameraFocalPoint |
| 31 | + */ |
| 32 | + getUseCameraFocalPoint(): boolean; |
| 33 | + |
| 34 | + /** |
| 35 | + * Set the value of useCameraFocalPoint |
| 36 | + * @param useCameraFocalPoint if true, the focal point of the camera will be used if userOrigin is not set. |
| 37 | + */ |
| 38 | + setUseCameraFocalPoint(useCameraFocalPoint: boolean): boolean; |
| 39 | + |
| 40 | + /** |
| 41 | + * Get the value of useCameraNormal |
| 42 | + */ |
| 43 | + getUseCameraNormal(): boolean; |
| 44 | + |
| 45 | + /** |
| 46 | + * Set the value of useCameraNormal |
| 47 | + * @param useCameraNormal if true, the normal of the camera will be used if userNormal is not set. |
| 48 | + */ |
| 49 | + setUseCameraNormal(useCameraNormal: boolean): boolean; |
| 50 | + |
| 51 | + /** |
| 52 | + * |
| 53 | + * @param callData |
| 54 | + * @param glRenderWindow |
| 55 | + */ |
| 56 | + handleEvent(callData: any, glRenderWindow: vtkOpenGLRenderWindow): Vector3; |
| 57 | + |
| 58 | + /* ------------------------------------------------------------------- */ |
| 59 | + |
| 60 | + /** |
| 61 | + * Set the user normal. |
| 62 | + * This normal take precedence on the handleNormal and the widgetNormal. |
| 63 | + * This normal should not be set within the widget internal code. |
| 64 | + * @param {Vector3} normal The normal coordinate. |
| 65 | + */ |
| 66 | + setUserNormal(normal: Vector3): boolean; |
| 67 | + |
| 68 | + /** |
| 69 | + * Set the user normal (see setUserNormal). |
| 70 | + * @param {Number} x The x coordinate. |
| 71 | + * @param {Number} y The y coordinate. |
| 72 | + * @param {Number} z The z coordinate. |
| 73 | + */ |
| 74 | + setUserNormal(x: number, y: number, z: number): boolean; |
| 75 | + |
| 76 | + /** |
| 77 | + * Set the user normal (see setUserNormal). |
| 78 | + * @param {Vector3} normal The normal coordinate. |
| 79 | + */ |
| 80 | + setUserNormalFrom(normal: Vector3): boolean; |
| 81 | + |
| 82 | + /** |
| 83 | + * Set the user origin. |
| 84 | + * This origin take precedence on the handleOrigin and the widgetOrigin. |
| 85 | + * This origin should not be set within the widget internal code. |
| 86 | + * @param {Vector3} origin The coordinate of the origin point. |
| 87 | + */ |
| 88 | + setUserOrigin(origin: Vector3): boolean; |
| 89 | + |
| 90 | + /** |
| 91 | + * Set the user origin (see setUserOrigin). |
| 92 | + * @param {Number} x The x coordinate of the origin point. |
| 93 | + * @param {Number} y The y coordinate of the origin point. |
| 94 | + * @param {Number} z The z coordinate of the origin point. |
| 95 | + */ |
| 96 | + setUserOrigin(x: number, y: number, z: number): boolean; |
| 97 | + |
| 98 | + /** |
| 99 | + * Set the user origin (see setUserOrigin). |
| 100 | + * @param {Vector3} origin The coordinate of the origin point. |
| 101 | + */ |
| 102 | + setUserOriginFrom(origin: Vector3): boolean; |
| 103 | + |
| 104 | + /* ------------------------------------------------------------------- */ |
| 105 | + |
| 106 | + /** |
| 107 | + * Set the handle normal. |
| 108 | + * This normal is used after the userNormal and before the widgetNormal. |
| 109 | + * This normal is automatically set by any state having a manipulatorMixin, |
| 110 | + * and can be overridden in the widget code. |
| 111 | + * @param {Vector3} normal The normal coordinate. |
| 112 | + */ |
| 113 | + setHandleNormal(normal: Vector3): boolean; |
| 114 | + |
| 115 | + /** |
| 116 | + * Set the handle normal (see setHandleNormal). |
| 117 | + * @param {Number} x The x coordinate. |
| 118 | + * @param {Number} y The y coordinate. |
| 119 | + * @param {Number} z The z coordinate. |
| 120 | + */ |
| 121 | + setHandleNormal(x: number, y: number, z: number): boolean; |
| 122 | + |
| 123 | + /** |
| 124 | + * Set the handle normal (see setHandleNormal). |
| 125 | + * @param {Vector3} normal The normal coordinate. |
| 126 | + */ |
| 127 | + setHandleNormalFrom(normal: Vector3): boolean; |
| 128 | + |
| 129 | + /** |
| 130 | + * Set the handle origin. |
| 131 | + * This origin is used after the userOrigin and before the widgetOrigin. |
| 132 | + * This origin is automatically set by any state having a manipulatorMixin, |
| 133 | + * and can be overridden in the widget code. |
| 134 | + * @param {Vector3} origin The coordinate of the origin point. |
| 135 | + */ |
| 136 | + setHandleOrigin(origin: Vector3): boolean; |
| 137 | + |
| 138 | + /** |
| 139 | + * Set the handle origin (see setHandleOrigin). |
| 140 | + * @param {Number} x The x coordinate of the origin point. |
| 141 | + * @param {Number} y The y coordinate of the origin point. |
| 142 | + * @param {Number} z The z coordinate of the origin point. |
| 143 | + */ |
| 144 | + setHandleOrigin(x: number, y: number, z: number): boolean; |
| 145 | + |
| 146 | + /** |
| 147 | + * Set the handle origin (see setHandleOrigin). |
| 148 | + * @param {Vector3} origin The coordinate of the origin point. |
| 149 | + */ |
| 150 | + setHandleOriginFrom(origin: Vector3): boolean; |
| 151 | + |
| 152 | + /* ------------------------------------------------------------------- */ |
| 153 | + |
| 154 | + /** |
| 155 | + * Set the widget normal. |
| 156 | + * This normal is used if no other normals are set. |
| 157 | + * It can be used to define a normal global to the whole widget. |
| 158 | + * @param {Vector3} normal The normal coordinate. |
| 159 | + */ |
| 160 | + setWidgetNormal(normal: Vector3): boolean; |
| 161 | + |
| 162 | + /** |
| 163 | + * Set the widget normal (see setWidgetNormal). |
| 164 | + * @param {Number} x The x coordinate. |
| 165 | + * @param {Number} y The y coordinate. |
| 166 | + * @param {Number} z The z coordinate. |
| 167 | + */ |
| 168 | + setWidgetNormal(x: number, y: number, z: number): boolean; |
| 169 | + |
| 170 | + /** |
| 171 | + * Set the widget normal (see setWidgetNormal). |
| 172 | + * @param {Vector3} normal The normal coordinate. |
| 173 | + */ |
| 174 | + setWidgetNormalFrom(normal: Vector3): boolean; |
| 175 | + |
| 176 | + /** |
| 177 | + * Set the widget origin. |
| 178 | + * This origin is used if no other origins are set. |
| 179 | + * It can be used to define an origin global to the whole widget. |
| 180 | + * @param {Vector3} origin The coordinate of the origin point. |
| 181 | + */ |
| 182 | + setWidgetOrigin(origin: Vector3): boolean; |
| 183 | + |
| 184 | + /** |
| 185 | + * Set the widget origin (see setWidgetOrigin). |
| 186 | + * @param {Number} x The x coordinate of the origin point. |
| 187 | + * @param {Number} y The y coordinate of the origin point. |
| 188 | + * @param {Number} z The z coordinate of the origin point. |
| 189 | + */ |
| 190 | + setWidgetOrigin(x: number, y: number, z: number): boolean; |
| 191 | + |
| 192 | + /** |
| 193 | + * Set the widget origin (see setWidgetOrigin). |
| 194 | + * @param {Vector3} origin The coordinate of the origin point. |
| 195 | + */ |
| 196 | + setWidgetOriginFrom(origin: Vector3): boolean; |
| 197 | +} |
| 198 | + |
| 199 | + |
| 200 | +/** |
| 201 | + * Method use to decorate a given object (publicAPI+model) with vtkAbstractManipulator characteristics. |
| 202 | + * |
| 203 | + * @param publicAPI object on which methods will be bounds (public) |
| 204 | + * @param model object on which data structure will be bounds (protected) |
| 205 | + * @param {IAbstractManipulatorInitialValues} [initialValues] (default: {}) |
| 206 | + */ |
| 207 | +export function extend(publicAPI: object, model: object, initialValues?: IAbstractManipulatorInitialValues): void; |
| 208 | + |
| 209 | +/** |
| 210 | + * Method use to create a new instance of vtkAbstractManipulator |
| 211 | + */ |
| 212 | +export function newInstance(initialValues?: IAbstractManipulatorInitialValues): vtkAbstractManipulator; |
| 213 | + |
| 214 | +/** |
| 215 | + * vtkAbstractManipulator. |
| 216 | + */ |
| 217 | +export declare const vtkAbstractManipulator: { |
| 218 | + newInstance: typeof newInstance, |
| 219 | + extend: typeof extend, |
| 220 | +}; |
| 221 | +export default vtkAbstractManipulator; |
0 commit comments