<div dir="ltr">Hello!<div><br></div><div style>Some code-fragments for implementing a &#39;dolly-zoom&#39; on right-mouse-button click:</div><div style><br></div><div style>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:</div>
<div style><br></div><div style><div>private void rightButtonPressVtkEvt(vtkObject sender, vtkObjectEventArgs e) {</div><div>   RenderWindowInteractorStyle.StartDolly();</div><div>}</div><div>private void rightButtonReleaseVtkEvt(vtkObject sender, vtkObjectEventArgs e) {</div>
<div>   RenderWindowInteractorStyle..EndDolly();</div><div>}</div></div><div style><br></div><div style>All you have to do is now to add this two events to the current Render-Window-Interactor-Style:</div><div style><br></div>
<div style><div>RenderWindowInteractorStyle.RightButtonPressEvt +=</div><div>    new vtkObject.vtkObjectEventHandler(rightButtonPressVtkEvt);</div><div>    </div><div>RenderWindowInteractorStyle.RightButtonReleaseEvt +=</div>
<div>    new vtkObject.vtkObjectEventHandler(rightButtonReleaseVtkEvt);  </div></div><div style><br></div><div style>That&#39;s all.</div><div style><br></div><div style>And if you are interested in using <span style="font-family:arial,sans-serif;font-size:13px">Activiz.net, then please check this kickstarter-project &lt;</span><a href="http://www.kickstarter.com/projects/dlrdave/activiz-net-installers-featuring-vtk-510">http://www.kickstarter.com/projects/dlrdave/activiz-net-installers-featuring-vtk-510</a>&gt; out.</div>
<div style><br></div><div style><br></div><div style>hth</div><div style><br></div><div style>mirko</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 22, 2013 at 2:47 PM, Max <span dir="ltr">&lt;<a href="mailto:smapersmaper@gmail.com" target="_blank">smapersmaper@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David and thank you for your reply,<br>
I tried to do that example, i&#39;m working on .Net with Activiz and the<br>
MouseInteractorStyle4 OnLeftButtonDown handlers are not called.<br>
Maybe it is because of vtkTypeMacro(MouseInteractorStyle4,<br>
vtkInteractorStyleTrackballCamera);<br>
which i just skipped during the example translation to c#.<br>
What am I missing?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Change-default-mouse-buttons-tp5720853p5720864.html" target="_blank">http://vtk.1045678.n5.nabble.com/Change-default-mouse-buttons-tp5720853p5720864.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Real programmers don&#39;t document; if it was<br>hard to write, it should be hard to understand.
</div>