You can simply add another scalar array with<br><br>foo->SetName("my scalar");<br>uGrid->GetPointData()->AddArray(foo);<br><br>The attributes are merely for convenience - they are treated like any other array. Most filters have methods to select any arbitrary array by name. It is usually something like SetInputArrayToProces(...) for filters.<br>
<br>-berk<br><br><div class="gmail_quote">On Tue, Feb 16, 2010 at 6:06 AM, Rakesh Patil <span dir="ltr"><<a href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello, <br><br>Is it possible to use two scalars for a single unstructured grid.?? Actually, to display vectors I am computing scale factor for each point and storing in a data array and i set this array as a scalar for unstructured grid:<br>
<br>uGrid->SetScalar(vec_values);<br><br>and i set this grid to glyph object<br><br>glyph->SetInput(uGrid);<br><br>and say,<br><br>glyph->SetScaleModeToScaleByScalar();<br><br>BY doing so, i get the desired output.. But when i want to display colored vectors, then i need to replace this scalar data array with color data array.. So my question is, by re[placing, will my scale factor data array be affected?? <br>
<br>If so is there any technique, where in i can attach more than one data array as a scalar to unstructured grid..?<br><br>Thanks<br>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>