[vtkusers] Pb vtkGlyph3D + vtkUnstructuredGrid
TDeschamps at lbl.gov
TDeschamps at lbl.gov
Thu Jul 10 20:47:42 EDT 2003
Hi vtkUsers
Here is my problem: I have a set of vtkFloatArray vectors in 2D/3D at
different vtkPoints points in space. I would like to input them to a
vtkGlyph3D.
They are stored in vtkPoints * points and vtkFloatArray * vectors
It could be something similar than the carotid arteries example in the
Vtk Book.
My vectors are not equally spaced, so I decided to input them into a
vtkUnstructuredGrid * sgrid, as is
sgrid -> SetPoints( points );
sgrid -> GetPointData() -> SetVectors( vectors );
And I input this grid into a vtkGlyph3D
vtkGlyph3D * hedgehog = vtkGlyph3D::New();
hedgehog -> SetSource( this -> glyph2D -> GetOutput() );
hedgehog -> SetInput( sgrid );
hedgehog -> Update();
The result is very confusing: a lot of vectors are drawn at places where
they were not defined, exactly like if it was not supporting the fact
that the grid was not structured. Directions are random, except at
locations where I defined it.
What I want to achieve is to have those nice arrows given by the
vtkGlyph3D at every point I have, pointing in the right direction.
Is there a way to do that?
Many thanks.
Thomas (TDeschamps at lbl.gov)
More information about the vtkusers
mailing list