[vtkusers] How disable a interactor

Naim naim at electromagneticworks.com
Thu Mar 15 11:27:08 EDT 2007


Override the OnLeftButtonDown for example and use a Boolean flag.

 

virtual void  OnLeftButtonDown()

{

      if(disable)

            return;

 

      vtkInteractorStyleTrackballCamera::OnLeftButtonDown();

}

 

Before this you must derive your interactor from
vtkInteractorStyleTrackballCamera (my default interactor) class.

 

 

Naim Himrane

Electromagneticworks Inc.

 

  _____  

From: vtkusers-bounces+naim=electromagneticworks.com at vtk.org
[mailto:vtkusers-bounces+naim=electromagneticworks.com at vtk.org] On Behalf Of
Francois Louis LAILLIER
Sent: March 15, 2007 10:54 AM
To: vtkusers at vtk.org
Subject: [vtkusers] How disable a interactor

 

Hello, I'm programming in visual basic language. It's particular to use
interactor in this language.

 

The interactors like rotation, zoom and pan with the mouse are setting by
default in VB6. 

I have a checkbox, when I tick it, I enable the leftbuttonpressevent of the
mouse, and the rotation of camera doesn't work, that works.

But when I untick  the checkbox, I want the leftbuttonpressevent is disable.
I used renwin.removeObservers.

 

Is there the good function? Or how can I do to put the interactor by
default. 

 

Thanks!

 

Best regards, Francois Louis.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070315/8fb0319d/attachment.htm>


More information about the vtkusers mailing list