[vtkusers] strange vtkGlyph3D behavior

Christopher M. Navarro cnavarro at ncsa.uiuc.edu
Thu Jul 3 11:50:38 EDT 2003


I'm using a recent nightly build and I've uncovered some strange behavior 
that I haven't had a chance to track down but I wanted to post it here to 
see if anyone else has seen this and if it's a misunderstanding on my part 
about glyphing.  If I have a dataset where spheres are colored by a scalar 
and I use a pointpicker to pick the glyphs (with GeneratePointIds() on) 
and I try to get the scalar value, it works fine and gives me the 
appropriate ID.  If instead of a scalar, I turn this into a 3 component 
vector (essentially 1, 1, scalar) in order to scale a cylinder glyph's 
height and then use a pointpicker, it returns me an ID that is incorrect.  
The strange part is this.  If the pointID is even, it's off by 2 times the 
id.  If the pointID is odd, it's off by 2 times the ID plus 1.  To 
clarify, I do the following:

vtkDataArray pointIds = 
glyph.GetOutput().GetPointData().GetArray("InputPointIds);

int pID = (int)pointIds.GetTuple1(picker.GetPointId());

This pID is off by twice the correct ID if pID is even, or 2 *pID + 1 if 
pID is odd.  The glyphs are colored correctly in the case of the spheres 
and scaled correctly in the case of the cylinders.  Just the ID's of the 
vector scaled glyphs are off.  Any ideas as to what is happening?  

regards, 
chris
-- 
Christopher M. Navarro
Research Programmer
Automated Learning Group
National Center for Supercomputing Applications
University of Illinois @ Urbana - Champaign
cnavarro at ncsa.uiuc.edu






More information about the vtkusers mailing list