[vtkusers] please someone help me on this code

david michell davidmichell at rediffmail.com
Wed Feb 25 10:24:15 EST 2004


An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040225/6bb672ec/attachment.htm>
-------------- next part --------------
Hi,
thanks for reading.

I have something like this.

An unstructured grid of points. The unstructured grid has two arrays.

I want to set glyphs for the points.
The size of the glyph must ceom from the array 2 and the colour of the glyph must come from the array 1.

The code fragments are as follows.
//m_unstructuredgrid is vtkUnstructuredGrid object
m_unstructuredgrid->GetPointData()->AddArray(GlyphColourArray);
m_unstructuredgrid->GetPointData()->AddArray(GlyphSizeArray);

m_glyph3D->SetInput(m_unstructuredgrid);
//m_spheresource is vtkSphereSource object
m_glyph3D->SetSource(m_spheresource->GetOutput());
m_glyph3D->SetScaleModeToScaleByScalar();

m_glyphmapper->SetInput(m_glyph3D->GetOutput());

m_glyphactor->SetMapper(m_glyphmapper);

The question is how to tell VTK to use GlyphColourArray for the glyph colours and GlyphSizeArray for the glyph sizes?

Thank you,
david michell


More information about the vtkusers mailing list