[vtkusers] normal of a point or cell
Amy Henderson
amy.henderson at kitware.com
Fri Dec 15 15:46:40 EST 2000
At 03:32 PM 12/15/2000 -0500, Chris Tsui wrote:
>Dear All,
>
>I posted this question few days ago... getting no reply.. I guess this
>is kind of stupid that no one would bother to answer.. but I am still
>struggling with this problem.. anyways.. here's my question again :
>
>- I would like to get the normal whenever I click on the surface of the
>mesh I have.. I can get the cell id or the world coordinates without
>problem.. what I am struggling with is how to retrieve the normal of a
>specific cell?? any idea??
>your help would be greatly appreciated.
Have normals been computed for your mesh? If it is a polydata mesh, you
can generate normals using the vtkPolyDataNormals filter. (If you want
normals per cell, specifically call ComputeCellNormalsOn for the polydata
normals filter.)
Once you have cell normals, you can get the normal for a particular cell
with the following call:
mesh->GetCellData()->GetNormals()->GetNormal(cellId)
I hope this helps.
Amy
>Regards,
>
>Chris.
>
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic.
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list