[vtkusers] vtkPolyDataNormals/ vertex normals

Nils H. Busch nilsb at cns.mpg.de
Tue Dec 10 12:32:19 EST 2002


Hi,

sorry for asking what certainly has been answered before, though I could
not find any  reference to it.

What is the correct and fastest way to access the vertex normals of
vtkPolyDataNormals on a vertex id basis ?
I need to access them and store them in a separate data structure with
(hopefully) the same index as the points in the corresponding
vtkPolyData.

What I do is : run a contour filter, create triangle strips from that
output and copy the vertices and normals into my own data structure.
When accessing the normals with polyData->GetPointData()->GetNormals(),
the normal indices and point indixes don't seem to match, as a I get a
garbled looking result (maybe due to the filters (decimate/smooth...) in
my intermediate pipeline).
Therefore, I tried to use vtkPolyDataNormals on the pipeline output, but
could not find out how to access the vtkFloatArray PolyNormal. I had
wrongly assumed that it would be assigned back to the Normal PointData
for the original polydata.

Any hints or pointers greatly appreciated.

--
    Nils H. Busch
    Max-Planck-Institute of Cognitive Neuroscience
    phone:  ++49 (341) 9940-035 fax:  ++49 (341) 9940-204
    e-mail: nilsb at cns.mpg.de






More information about the vtkusers mailing list