pick
- m3sh.vis.pick(x, y, type='cell', iren=None)[source]
Perform pick action.
Performs a pick operation at certain display coordinates. Cell and point picking is supported.
- Parameters:
- Returns:
actor (vtkActor) – Results in
None
if nothing was picked.cell_id (int) – Cell identifier, -1 if no cell was picked.
point_id (int) – Point identifier, -1 if no point was picked.
point (ndarray) – World coordinates of the picked point.
By default all render objects created by functions in this module are not pickable. To make an actor available for picking, modify its
pickable
attribute.A successful pick operation returns the picked actor and information about the picked cell or point, respectively.
When picking cells the coordinates of the intersection of the pick ray and the picked cell is returned in point. In addition to the index cell_id of the picked cell, the index of the closest vertex of the picked cells to this location is returned as point_id.
Note
This function returns three values when picking points and four values when picking cells.