[vtkusers] Again: How to scale widget representations based on scale interactions with a different widget?

kent williams nkwmailinglists at gmail.com
Wed Jun 17 13:20:30 EDT 2009


Again very simple: I have vtkHandleWidget instances in multiple views.
When I scale the handle in one view, I'd like the other instances to
scale as well.

What I've discovered since my last post on the subject:

1. Trying to observe vtkWidgetEvent::Scale and
vtkWidgetEvent::EndScale is wrong. This is clear to me now from the
Doxygen page for vtkHandleWidget, but it bears repeating, because it
was my first impulse on how to catch scale events.

2. There's no way to recover the scaling from the handle
representation, or set the scaling of the representation.

3. You can't really share vtkHandleRepresentations between
vtkHandleWidget instances.  Well you can, and if you do, scaling in
one Widget will update the others.  But the position is stored in the
representation, and it puts the handle in the other views at the same
display coordinates -- which is wrong.

The only way I can see to do this is to write my own subclass for my
chosen representation, and expose methods to set and get the scaling.
Right?



More information about the vtkusers mailing list