-
-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(vtkpicker): update doc and typing #2985
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Vector3 } from "../../../types"; | ||
import { Vector3, Nullable } from "../../../types"; | ||
import vtkAbstractPicker, { IAbstractPickerInitialValues } from "../AbstractPicker"; | ||
import vtkActor from "../Actor"; | ||
import vtkMapper from '../Mapper'; | ||
|
@@ -21,39 +21,34 @@ export interface vtkPicker extends vtkAbstractPicker { | |
getActors(): vtkActor[]; | ||
|
||
/** | ||
* Get a pointer to the dataset that was picked (if any). | ||
* Get the dataset that was picked (if any). | ||
*/ | ||
getDataSet(): any; | ||
|
||
/** | ||
* Get mapper that was picked (if any) | ||
*/ | ||
getMapper(): null | vtkMapper; | ||
getMapper(): Nullable<vtkMapper>; | ||
|
||
/** | ||
* Get position in mapper (i.e., non-transformed) coordinates of pick point. | ||
*/ | ||
getMapperPosition(): number[]; | ||
getMapperPosition(): Vector3; | ||
|
||
/** | ||
* | ||
* Get a list of the points the actors returned by getActors were intersected at. | ||
*/ | ||
getMapperPositionByReference(): number[]; | ||
|
||
/** | ||
* Get a list of the points the actors returned by GetProp3Ds were intersected at. | ||
*/ | ||
getPickedPositions(): number[]; | ||
getPickedPositions(): Vector3[]; | ||
|
||
/** | ||
* Get tolerance for performing pick operation. | ||
*/ | ||
getTolerance(): number; | ||
|
||
/** | ||
* FIXME: this needs to be check again | ||
* Invoke a pick change event. | ||
*/ | ||
finetjul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
//invokePickChange(pickedPositions: number[]): any; | ||
invokePickChange(pickedPositions: number[]): unknown; | ||
|
||
/** | ||
* FIXME: this needs to be check again | ||
|
@@ -72,10 +67,10 @@ export interface vtkPicker extends vtkAbstractPicker { | |
|
||
/** | ||
* Perform pick operation with selection point provided. | ||
* @param selection | ||
* @param {vtkRenderer} renderer The vtkRenderer instance. | ||
* @param {Vector3} selection First two values should be x-y pixel coordinate, the third is usually zero. | ||
* @param {vtkRenderer} renderer The renderer on which you want to do picking. | ||
*/ | ||
pick(selection: any, renderer: vtkRenderer): any; | ||
pick(selection: Vector3, renderer: vtkRenderer): void; | ||
|
||
/** | ||
* Set position in mapper coordinates of pick point. | ||
|
@@ -86,13 +81,9 @@ export interface vtkPicker extends vtkAbstractPicker { | |
setMapperPosition(x: number, y: number, z: number): boolean; | ||
|
||
/** | ||
* Set position in mapper coordinates of pick point. | ||
* @param {Vector3} mapperPosition The mapper coordinates of pick point. | ||
*/ | ||
setMapperPositionFrom(mapperPosition: Vector3): boolean; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
/** | ||
* Specify tolerance for performing pick operation. | ||
* Specify tolerance for performing pick operation. Tolerance is specified | ||
* as fraction of rendering window size. (Rendering window size is measured | ||
* across diagonal.) | ||
* @param {Number} tolerance The tolerance value. | ||
*/ | ||
setTolerance(tolerance: number): boolean; | ||
|
@@ -127,6 +118,11 @@ export function newInstance(initialValues?: IPickerInitialValues): vtkPicker; | |
* the prop itself, the data set, and the mapper. | ||
* For vtkPicker the closest prop is the one whose center point (i.e., center of bounding box) projected on the view ray is closest | ||
* to the camera. Subclasses of vtkPicker use other methods for computing the pick point. | ||
* | ||
* vtkPicker is used for quick geometric picking. If you desire more precise | ||
* picking of points or cells based on the geometry of any vtkProp3D, use the | ||
finetjul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* subclasses vtkPointPicker or vtkCellPicker. For hardware-accelerated | ||
* picking of any type of vtkProp, use vtkPropPicker or vtkWorldPointPicker. | ||
*/ | ||
export declare const vtkPicker: { | ||
newInstance: typeof newInstance, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This methods should not be removed
![Capture d’écran du 2024-01-13 10-44-04](https://private-user-images.githubusercontent.com/878518/296442894-459a8f3e-fb01-4f63-9405-ef3604f9d122.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODc0OTMsIm5iZiI6MTczOTA4NzE5MywicGF0aCI6Ii84Nzg1MTgvMjk2NDQyODk0LTQ1OWE4ZjNlLWZiMDEtNGY2My05NDA1LWVmMzYwNGY5ZDEyMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQwNzQ2MzNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zMDZiZDljZTAzZjA0MWU2M2M1NjY3NDMwYmU5NzljM2RlNDlmZTJhNWI2NWRjNDYwOTI2Nzc3OWY5NzNlOWJmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.kXCjGCr7EuPpwOOadSRipVkeQkJaJDN8aOV1TqvzcOo)