[vtkusers] Why the baggage in vtkInteractorStyle?
David Cole
DLRdave at aol.com
Tue Aug 9 07:51:57 EDT 2016
I think it's really just for convenience / laziness. It's nice to be
able to use all the familiar keyboard shortcuts in all your simple
little test/example VTK apps without having to customize the
interactor style at all.
It's been that way for a long long time now, and changing it would
probably be somewhat controversial among some of the long time VTK
developers.
As with most answers to questions like this, it's just a consequence
of the organic growth VTK has undergone over time. It probably wasn't
really **designed** that way intentionally, it probably just sort of
happened that way, and since it works and there is a way to do what
you want (override, and implement everything yourself...) then nobody
has bothered with trying to impose a more sensible design on it after
the fact.
HTH,
David C.
On Tue, Aug 9, 2016 at 5:47 AM, Elvis Stansvik
<elvis.stansvik at orexplore.com> wrote:
> 2016-08-08 15:30 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
>>
>> Hi all,
>>
>> This is a bit of a general question about the interactor style system in
>> VTK.
>>
>> Why does vtkInteractorStyle, which is described as the superclass of all
>> interactor styles, have things functions like Dolly, Pan, Zoom et.c.? And
>> why does it have keypress behaviors at all (e.g. 'j', 't', 'c', 'a', ...)?
>
>
> I realize now that the docs are a little out of date, and that some of the
> keyboard shortcuts I mention are now handled by vtkInteractorStyleSwitch.
>
> But I'm still wondering why vtkInteractorStyle makes so many assumptions
> about how a subclasser wishes to implement his/her style. I would have
> expected a more "bare bone" base class.
>
> Elvis
>
>>
>>
>> If it's supposed to be a general base class for interactor styles, why
>> should it make assumptions like this about the camera movements the
>> subclasser want to provide, and assumptions about keybindings?
>>
>> I'm looking for a base class to use, which is not making any such
>> assumptions, since I want to provide a completely custom behavior, without
>> having to guard myself against unwanted behavior coming from the base class.
>>
>> I've looked at, and even used vtkInteractorStyleUser, for this purpose
>> (even if it's described as something mostly for the scripting languages),
>> but I'm just wondering about the VTK design, why it was made this way?
>>
>> Thanks in advance,
>> Elvis
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list