[vtkusers] Simple queries
Sawsan Ahmed
sawsanahm at yahoo.com
Mon Jan 22 07:46:14 EST 2007
Hi,
I am not using any user interaction.Without user interaction how can I do that?
Oliver.
John Platt <jcplatt at dsl.pipex.com> wrote:
Hi,
Have you tried using vtkCellPicker in your interactor?
vtCellPicker* cellPicker = vtkCellPicker::New();
myInteractor->SetPicker(cellPicker);
cellPicker->Delete();
Then add observers for the standard pick event (P key)
vtkCallbackCommand* pickEventCBC = vtkCallbackCommand::New();
pickEventCBC->SetCallback(MyPickEventHandler );
vtkAbstractPicker* picker = myInteractor->GetPicker();
picker->AddObserver( vtkCommand::StartPickEvent, pickEventCBC, 0.5 );
picker->AddObserver( vtkCommand::PickEvent, pickEventCBC, 0.5 );
picker->AddObserver( vtkCommand::EndPickEvent, pickEventCBC, 0.5 );
pickEventCBC->Delete();
Do your work in MyPickEventHandler() e.g.
pickedCell = picker->GetCellId();
HTH
John.
-----Original Message-----
From: vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org [mailto:vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org] On Behalf Of Oliver Diessel
Sent: 22 January 2007 07:41
To: vtkusers at vtk.org
Subject: [vtkusers] Simple queries
Hi Everybody,
I am quite new in VTK.I have some queries.I have got a point on the surface of an object.I want to know the cell id which contains the point and I also want to know the normal of the cell ( Is there any difference between point normal and cell normal?)
Thanks everyone in advance.
Oliver.
Send instant messages to your online friends http://au.messenger.yahoo.com
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070122/4052bf22/attachment.htm>
More information about the vtkusers
mailing list