[vtkusers] structured grid -> normals at points

Amy Henderson amy.henderson at kitware.com
Tue Jan 6 10:30:23 EST 2004


At 09:12 AM 1/6/2004 -0600, John Hunter wrote:
> >>>>> "Amy" == Amy Henderson <amy.henderson at kitware.com> writes:
>
>     Amy> Take a look at vtkPolyDataNormals.  The on-line documentation
>     Amy> for that class is here:
>     Amy> http://www.vtk.org/doc/nightly/html/classvtkPolyDataNormals.html.
>
>Hi Amy, thanks for the response.  I did take a look at that class and
>but did not understand how I could use it to get the normals at the
>vertexes.  Eg, I didn't see any methods like
>
>   normVec = filter.GetNormal(vertexID)
>
>of
>
>   normalVecs = filter.GetNormals()
>
>
>So although vtkPolyDataNormals looks like just the right filter, I
>don't how to get the data out of it that I need.  The inherited method
>GetOutput returns vtkPolyData.  Should I be using this data to access
>the normal vectors?

Yes; filter->GetOutput()->GetPointData()->GetNormals() will return the 
vtkDataArray that contains the normals.

- Amy

>Thanks,
>John Hunter






More information about the vtkusers mailing list