Sometimes you can’t pick object accurately by vtkCellPicker even through you had set tolerance very small, then you can use vtkPropPicker if not care about the details of picked position.

vtkPropPicker uses hardware picking to determine the instance of vtk- Prop that was picked, as well as the pick position (in global coordinates). vtkPropPicker is generally faster than all other decendents of vtkAbstractPropPicker but it cannot return information detailed information about what was picked.

vtkCellPicker selects a cell and returns information about the intersection point (cell id, global coordinates, and parametric cell coordinates).The cell closest to the camera position along the specified ray is selected, along with its associated actor.It will generate a unique pick within the tolerance specified.

The relative usage statements for vtkPropPicker are:

m_Picker = vSP<vtkPropPicker>::New();

m_Picker->PickFromListon();

m_Picker->AddPickList( model->Getm_Actor() );

if( m_Picker->PickProp( pos[o], pos[1], m_Mainwindow->GetVtkRenderer() ) != 0 )
//...
    vtkActor *pickedActor = (vtkActor *)m_Picker->GetViewProp();
Categories: VTK

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X
0
Would love your thoughts, please comment.x
()
x