[vtkusers] Force uniform scaling in a vtkBoxWidget

David Cole david.cole at kitware.com
Fri Jul 18 17:18:39 EDT 2008


If you send along a patch and the Widgets developers think it's reasonable,
there's a good chance it will be applied to CVS HEAD of VTK...


HTH,
David


On Fri, Jul 18, 2008 at 4:13 PM, Serge Lalonde <serge at infolytica.com> wrote:

> Hello,
>
> I would like to enforce a uniform scaling in the
> vtkBoxWidget's.InteractionEvent. I have most of the code working but I would
> ideally like to detect if the operation is really a scaling because it may
> be moving or rotating instead (in which case I do the default).
>
> The problem is that there is no API that I could find in vtkBoxWidget that
> can tell me this. The frustrating part is that there is a private
> WidgetState enum, but it's protected.
>
> One idea was to compare the vtkBoxWidget's transform with its previous
> state and detect the biggest difference in orientation, position and scale
> (since only one can change), but that seems error prone.
>
> I could modify the code and add a vtkSetMacro()/vtkGetMacro() for the State
> field, but before I do that I wanted to check if there was a better way to
> do it. If I resort to this source code change, any chance that this can
> become a "standard" feature?
>
> Thanks.
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080718/775b30b1/attachment.htm>


More information about the vtkusers mailing list