<P>Hi, all:</P>
<P> For picking a object in a vtkTensorGlyph, I have gotten the non-zero return value with vtkPointPicker and vtkCellPicker. Which picker should I use to figure out which object I have picked? </P>
<P> vtkTensorGlyph seems to be different from Glyph3D, so the methods disscussed before couldn't be used here. How can I export the vtkTensorGlyph to an indexed cell set or point set? How can I associate a cell or a point with some specific object in the vtkTensorGlyph? Thanks a lot!</P>
<P>Below is the code building the vtkTensorGlyph.</P>
<P>vtkUnstructuredGrid Dataset=new vtkUnstructuredGrid();<BR> vtkPoints pointArray=new vtkPoints();<BR> vtkDoubleArray colorArray=new vtkDoubleArray();<BR> vtkDoubleArray tensorArray=new vtkDoubleArray();<BR> vtkSphereSource sphere = new vtkSphereSource();<BR> vtkTensorGlyph ellipsoids=new vtkTensorGlyph();<BR> vtkPolyDataMapper ellipMapper = new vtkPolyDataMapper();<BR> vtkPolyDataNormals ellipNormals=new vtkPolyDataNormals();</P>
<P> vtkActor ellipActor=new vtkActor();<BR> <BR> tensorArray.SetNumberOfComponents(9);</P>
<P> for(i=0; i<numObjects; i++)<BR> {<BR> pointArray.InsertNextPoint(objectArray[i].centroid);<BR> tensorArray.InsertNextTuple9(objectArray[i].tensor[0], objectArray[i].tensor[1], objectArray[i].tensor[2],<BR> objectArray[i].tensor[3], objectArray[i].tensor[4], objectArray[i].tensor[5],<BR> objectArray[i].tensor[6], objectArray[i].tensor[7], objectArray[i].tensor[8]);<BR> }</P>
<P> Dataset.SetPoints(pointArray);<BR> Dataset.GetPointData().SetTensors(tensorArray);</P>
<P> sphere.SetThetaResolution(20);<BR> sphere.SetPhiResolution(20);</P>
<P> ellipsoids.SetInput(Dataset);<BR> ellipsoids.SetSource(sphere.GetOutput());<BR> ellipsoids.ClampScalingOn();</P>
<P> ellipNormals.SetInput(ellipsoids.GetOutput());<BR> ellipMapper.SetInput(ellipNormals.GetOutput());</P>
<P> ellipActor.SetMapper(ellipMapper); // I get ellipsoid actor<BR>////////////////////////////////////////////////////////////////////////////</P>
<P> </P>
<P>BEST REGARDS</P>
<P> </P>
<P>Lian</P><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="$rd_url/tag/http://movies.yahoo.com/">Yahoo! Movies</a> - coverage of the 74th Academy Awards®