Skip to content

PointPicker

Introduction

vtkPointPicker is used to select a point by shooting a ray into a graphics window and intersecting with actor's defining geometry - specifically its points. Beside returning coordinates, actor, and mapper, vtkPointPicker returns the id of the point projecting closest onto the ray (within the specified tolerance). Ties are broken (i.e., multiple points all projecting within the tolerance along the pick ray) by choosing the point closest to the ray origin (i.e., closest to the eye).

See Also

vtkPickervtkCellPicker

Methods

extend

Method use to decorate a given object (publicAPI+model) with vtkPointPicker characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIPointPickerInitialValuesNo(default: {})

getPointIJK

getPointIJKByReference

getPointId

Get the id of the picked point. If PointId = -1, nothing was picked.

getUseCells

newInstance

Method use to create a new instance of vtkPointPicker

ArgumentTypeRequiredDescription
initialValuesIPointPickerInitialValuesNofor pre-setting some of its content

setUseCells

Specify whether the point search should be based on cell points or directly on the point list.

ArgumentTypeRequiredDescription
useCellsYes