<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">&nbsp;Hi EveryBody<br>&nbsp;<br>I have a trouble on the use of the witgets class.<br>When I use the vtkAngleWitget(vtkDistanceWitget...),I found they can't be picked.I used vtkCellPicker.<br>&nbsp;<br>I read this Url(http://vtk.1045678.n5.nabble.com/Interactor-on-vtkWidget-td2848124.html#a2848445)<br>&nbsp;<br>According to Dean Inglis' way<br>Wrote the following code:<br>&nbsp;&nbsp; &nbsp;this-&gt;pvtkCellPicker-&gt;PickFromListOn();<br>&nbsp;&nbsp; &nbsp;vtkDistanceWidget *pDistanceWidget = NULL;int i = 0;<br>&nbsp;&nbsp; &nbsp;for(i = this-&gt;CArrWitGets_Distance.GetSize()-1; i &gt;= 0; i--)<br>&nbsp;&nbsp; &nbsp;{ <br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pDistanceWidget = CArrWitGets_Distance.GetAt(i);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;vtkSmartPointer&lt;vtkPropCollection&gt; collection = vtkSmartPointer&lt;vtkPropCollection&gt;::New();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;vtkDistanceRepresentation::SafeDownCast(pDistanceWidget-&gt;GetRepresentation())-&gt;GetActors(collection);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;collection-&gt;InitTraversal();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;int r = collection-&gt;GetNumberOfItems();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;for(vtkIdType i=0; i&lt;collection-&gt;GetNumberOfItems(); i++)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;vtkActor* pActor = vtkActor::SafeDownCast(collection-&gt;GetNextProp());<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;this-&gt;pvtkCellPicker-&gt;AddPickList(pActor);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pDistanceWidget-&gt;Off();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//this-&gt;pvtkCellPicker-&gt;AddPickList(vtkDistanceRepresentation2D::SafeDownCast(pDistanceWidget-&gt;GetRepresentation())-&gt;GetAxis()); <br>&nbsp;&nbsp; &nbsp;}<br><br>I found i can't find anything in pDistanceWidget(collection-&gt;GetNumberOfItems() is zero),Who can tell me where I was wrong?<br>Is The Dean Inglis' way right?<br>have any other ways?<br><br>PS:How to get the class-type of "actor-&gt;GetMapper()-&gt;GetInput()"?<br>[IsTypeOf] function?&nbsp; if it can,can you give me some example's codes? <br><br>Thanks in advance</div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>