[vtkusers] Change default mouse buttons
mirko heuegger
mheuegger at gmail.com
Wed May 22 10:24:45 EDT 2013
Hello!
Some code-fragments for implementing a 'dolly-zoom' on right-mouse-button
click:
At fist you need two events, one for button press and the other for
the button release event, the first one starts the dolly and the second one
will stop it again:
private void rightButtonPressVtkEvt(vtkObject sender, vtkObjectEventArgs e)
{
RenderWindowInteractorStyle.StartDolly();
}
private void rightButtonReleaseVtkEvt(vtkObject sender, vtkObjectEventArgs
e) {
RenderWindowInteractorStyle..EndDolly();
}
All you have to do is now to add this two events to the current
Render-Window-Interactor-Style:
RenderWindowInteractorStyle.RightButtonPressEvt +=
new vtkObject.vtkObjectEventHandler(rightButtonPressVtkEvt);
RenderWindowInteractorStyle.RightButtonReleaseEvt +=
new vtkObject.vtkObjectEventHandler(rightButtonReleaseVtkEvt);
That's all.
And if you are interested in using Activiz.net, then please check this
kickstarter-project <
http://www.kickstarter.com/projects/dlrdave/activiz-net-installers-featuring-vtk-510>
out.
hth
mirko
On Wed, May 22, 2013 at 2:47 PM, Max <smapersmaper at gmail.com> wrote:
> Hi David and thank you for your reply,
> I tried to do that example, i'm working on .Net with Activiz and the
> MouseInteractorStyle4 OnLeftButtonDown handlers are not called.
> Maybe it is because of vtkTypeMacro(MouseInteractorStyle4,
> vtkInteractorStyleTrackballCamera);
> which i just skipped during the example translation to c#.
> What am I missing?
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Change-default-mouse-buttons-tp5720853p5720864.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Real programmers don't document; if it was
hard to write, it should be hard to understand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130522/8d7f023e/attachment.htm>
More information about the vtkusers
mailing list