<div class="gmail_quote">On Wed, Jun 17, 2009 at 10:20 AM, kent williams <span dir="ltr"><<a href="mailto:nkwmailinglists@gmail.com" target="_blank">nkwmailinglists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">Again very simple: I have vtkHandleWidget instances in multiple views.<br>When I scale the handle in one view, I'd like the other instances to<br>
scale as well.<br><br>What I've discovered since my last post on the subject:<br><br>1. Trying to observe vtkWidgetEvent::Scale and<br>vtkWidgetEvent::EndScale is wrong. This is clear to me now from the<br>Doxygen page for vtkHandleWidget, but it bears repeating, because it<br>
was my first impulse on how to catch scale events.<br><br>2. There's no way to recover the scaling from the handle<br>representation, or set the scaling of the representation.<br><br>3. You can't really share vtkHandleRepresentations between<br>
vtkHandleWidget instances. Well you can, and if you do, scaling in<br>one Widget will update the others. But the position is stored in the<br>representation, and it puts the handle in the other views at the same<br>display coordinates -- which is wrong.<br>
<br>The only way I can see to do this is to write my own subclass for my<br>chosen representation, and expose methods to set and get the scaling.<br>Right?</blockquote>
<div> </div>
<div>Or contribute a patch :)</div>
<div> </div>
<div>You are right, in that the scaling isn't directly exposed. Its internally computed by using a vtkTransform (represented by a 4x4 matrix) in response to interaction. You can expose it quite easily by setting the diagonal elements of the matrix representing the transform.<br>
<br>Thanks<br>--<br>karthik<br><br></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><span></span><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></blockquote></div>