[vtkusers] Simplest Way To : display normals (move normals to vectors)

Sebastien BARRE seb-ml-vtk at barre.nom.fr
Thu Sep 7 21:51:24 EDT 2000


Sometimes the simplest questions have long answers, but basically how do 
you guys display the normals of a points set in the shortest amount of code ?

vtkHedgeHog provides a simple way to display *vectors*, thus the question 
is now : how do I move/copy normals data to vectors data quickly ?

output->GetPointData()->SetVectors(input->GetPointData()->GetNormals) won't 
work because vtkNormals are not vtkVectors.

I wrote a vtkNormalsToVectors filter some time ago (as an introduction to 
polydata filter programming), it's small and easy, but I'm wondering if 
it's possible to achieve the same effect from Tcl, and without looping over 
the normals and building a new vtkVectors in a ProgrammableFilter. I'm 
quite sure there is a trick, one of these elegant and obvious VTK tricks, 
but lost in this sea of functions/features.


More information about the vtkusers mailing list