Re: Visualizing normal vectors
Andaharoo <[email protected]>
| Newsgroups | gmane.comp.lib.vtk.user |
|---|---|
| Message-ID | <[email protected]> |
Your error said an array index went out of bounds. What line? Also I noticed
you never set the source data for the glyph. Could be unrelated to your
current error message, but a problem.
The glyph mapper takes two inputs. The glyph data (positions, normals,
scalars, etc) and the source (thing to copy). So if you want arrows as the
normals do this:
vtkSmartPointer<vtkOpenGLGlyph3DMapper> glyph3D =
vtkSmartPointer<vtkOpenGLGlyph3DMapper>::New();
glyph3D ->SetInputData(polydata);
vtkSmartPointer<vtkArrowSource> glyphSource =
vtkSmartPointer<vtkArrowSource>::New();
glyphSource->Update();
glyph3D->SetSourceData(glyphSource->GetOutput());
glyph3D ->SetOrientationArray("normals");
glyph3D ->SetScaleFactor(0.5);
glyph3D ->Update();
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers