[vtkusers] Autodesk ViewCube in VTK?

Justin Weber onlyjus at gmail.com
Thu Mar 24 16:48:48 EDT 2016


I tried to access the mouse events of vtkOrientationMarkerWidget by adding
observers, however this does not seem to work.

class CustomOrientationMarkerWidget(vtk.vtkOrientationMarkerWidget):

    def __init__(self, parent=None):
        self.AddObserver("LeftButtonPressEvent",
self.left_button_press_event)

    def left_button_press_event(self, obj, event):
        print('pressed')

any ideas?

On Tue, Mar 22, 2016 at 12:29 PM, Thales Luis Rodrigues Sabino <
tluisrs at gmail.com> wrote:

> I was thinking about some widget similar to this a while ago.
> If you know of anyone who has already implemented this please let us know.
>
> On Tue, Mar 22, 2016 at 12:53 PM, Justin Weber <onlyjus at gmail.com> wrote:
>
>> Has anyone already implemented a similar interface to Autodesk's ViewCube
>> in vtk?
>> [image: Inline image 1]
>>
>> https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2014/ENU/Inventor/files/GUID-39793B52-120D-491B-B1A0-A93ECE9AF13E-htm.html
>>
>> if not, *vtkAnnotatedCubeActor* and the *vtkOrientationMarkerWidget* provide
>> most of the functionality. How would I detect mouse clicks on the faces of
>> the cube? Over-ride the OnLeftButtonDown() and OnLeftButtonUp() functions
>> of *vtkOrientationMarkerWidget* and detect the face that was clicked?
>>
>> Thanks!
>> Justin
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
> Thales Luis Rodrigues Sabino
>
> PhD Student at PGMC-UFJF <http://www.ufjf.br/pgmc/>
> Lattes <http://lattes.cnpq.br/0601030410417146> | LinkedIn
> <https://br.linkedin.com/in/tluisrs> | ResearchGate
> <https://www.researchgate.net/profile/Thales_Luis_Sabino>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160324/0e4a527f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 13373 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160324/0e4a527f/attachment.png>


More information about the vtkusers mailing list