FW: [vtkusers] Simple queries
Oliver Diessel
odiessel at yahoo.com.au
Mon Jan 22 11:25:51 EST 2007
Hello,
Thanks for answers.I am also not using any user interaction.As I ahve only points,first I need to get cellId .And after that GellCellPoints can give me points ids sharing the cell.But how can I get normal of a cell?
Oliver.
Aina Nagma <aina_nagma at yahoo.com> wrote:
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._______________________________________________
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
Send instant messages to your online friends http://au.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070123/f0a4d852/attachment.htm>
More information about the vtkusers
mailing list