FW: [vtkusers] Simple queries

John Platt jcplatt at dsl.pipex.com
Mon Jan 22 10:16:44 EST 2007


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
<http://us.rd.yahoo.com/evt=49982/*http:/advision.webevents.yahoo.com/ma
ilbeta/newmail_tools.html>  Auto-Check.
Try the Yahoo!
<http://us.rd.yahoo.com/evt=49982/*http:/advision.webevents.yahoo.com/ma
ilbeta/newmail_tools.html>  Mail Beta.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070122/941f18e8/attachment.htm>


More information about the vtkusers mailing list