FW: [vtkusers] Simple queries
Aina Nagma
aina_nagma at yahoo.com
Mon Jan 22 10:48:46 EST 2007
Hi,
I have following two suggestions regarding the query:
1) I think instead of GetCellPoints() ,it is better to use either foundCellId/FindAndGetCell ( I am not sure though).
2)As far as I know vtkPolyDataNormals give point normals.Others can suggest regarding getting cell nomals.
Best regards,
A. N.
John Platt <jcplatt at dsl.pipex.com> wrote:
Hi,
I should have read your mail more closely. If your surface is polydata, have you tried vtkPolyData::GetCellPoints()?
I am guessing that the point normals are the average of the cell normals sharing the point.
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 Sawsan Ahmed
Sent: 22 January 2007 12:46
To: John Platt
Cc: vtkusers at vtk.org
Subject: RE: [vtkusers] Simple queries
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.
_______________________________________________
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
---------------------------------
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070122/05dcf039/attachment.htm>
More information about the vtkusers
mailing list