[vtkusers] Force uniform scaling in a vtkBoxWidget
Serge Lalonde
serge at infolytica.com
Fri Jul 18 16:13:17 EDT 2008
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.
More information about the vtkusers
mailing list