[vtkusers] Moving a node using mouse

Rakesh Patil rakeshthp at in.com
Wed Feb 24 06:19:25 EST 2010


 Well,If you observe the way rubberbandInteractorstyle works during zooming, I guess it redraws the new rectangle by replacing old one.. Am i right.??This happens in mouse drag event.. (mouse move event).. So similarly, can i move the selected node or vertex in the mouse move event..?? Any how when I pick a node or vertex, i get the ID of that particular node..?? So cant i change the value of this point (node or vertex) everytime on mouse move event..??Please correct me if am going wrong somewhere..Thanks Original message From:David Doria< daviddoria+vtk at gmail.com >Date: 23 Feb 10 19:14:21Subject:Re: [vtkusers] Moving a node using mouseTo: rakeshthp at in.comOn Tue, Feb 23, 2010 at 7:08 AM, Rakesh Patilwrote: Hello,I have an unstructured grid and it contains only node points.. Now if I wish to move one of the nodes among the set of nodes, then, how do i do it.??I have successfully implemented the picking of node.. ThanksRegardsRakesh PatilBy "nodes" do you mean "vertices"? I don
 't think that it is really trivial to move one point  you'd have to create a new vtkPolyData with a single point+vertex and create a new actor/mapper for it. The trick would then be deleting the point/vertex from the set of points. I think the only way to do this is to loop through the points and add all of them except the one you want to delete to a new object. You can imagine this would be quite slow. Is there a better way to delete a point from a vtkPoints/vtkPolyData?Thanks,David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100224/f8d047a4/attachment.htm>


More information about the vtkusers mailing list