[vtkusers] vtkPanel custom InteractorStyle

Jonathan Ruiz Peinado jonathan.ruiz3 at gmail.com
Thu Jun 21 11:17:10 EDT 2012


Hi I'm trying to build my own interactor style class, as it's shown in the
documentation seems an easy  job but is not working for some reason this is
part of the code:

----------------------------------------------------------------------------------------------------
vtkInteractorStylePointer interactor = new vtkInteractorStylePointer();

interactor.SetInteractor(vtkPanel.getRenderWindowInteractor());
vtkPanel.setInteractorStyle(interactor);
----------------------------------------------------------------------------------------------------

if I use one of the predefined styles vtkInteractorStyle* they work
perfectly well , but when  I try to use mine vtkInteractorStylePointer()
doesn't work at all.


vtkInteractorStylePointer should print out some text when left button is
pressed, but it doesn't.

----------------------------------------------------------------------------------------------------
public class vtkInteractorStylePointer extends vtk.vtkInteractorStyle{

    @Override
    public void OnLeftButtonDown() {
        System.out.println("xxx");
        super.OnLeftButtonDown();

    }
    @Override
    public void OnLeftButtonUp() {
        System.out.println("yyy");
        super.OnLeftButtonUp();
    }

}
------------------------------------------------------------------------------------------------------

do some body know what's going wrong ?

Thanks for your time!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120621/73479082/attachment.htm>


More information about the vtkusers mailing list