<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I tried to control my paraview from my Xoom tablet, throw plugin
successfully. I used a plugin that opens a port and listen to
python commands, then from my tablet I send python command to rotate
zoom, pan clip... (so now a have a realy big pad ;) ).<br>
<br>
for more information read:<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.paraview.org/pipermail/paraview/2012-January/023704.html">http://www.paraview.org/pipermail/paraview/2012-January/023704.html</a><br>
<br>
Felipe <br>
<br>
On 29/05/2012 07:23, David Zemon wrote:
<blockquote
cite="mid:CAGKeP0Rk6nzTCV0usnjRruH+Sp6sz1n2gNodb0VCRe4mrZOv4w@mail.gmail.com"
type="cite">Hello,
<div><br>
</div>
<div><b>Overview</b></div>
<div>I am attempting to control ParaView v3.14.1 with something
other than a mouse and keyboard. I don't know how to do this -
I've taken some wild guesses and bits 'n' pieces have started to
work. I could really use some help from someone that knows the
inner-workings though.</div>
<div><br>
</div>
<div><b>What I'd Like to Happen</b></div>
<div>I have an class, foo, with some events and callbacks of its
own. Foo is not related to ParaView in any way other than foo
needs to make ParaView do stuff as it sees fit. In the
callbacks, I'd like to do things like zoom, pan and rotate.
Eventually I'd like foo to be able add filters and such too, but
that's a long way down the road.</div>
<div><br>
</div>
<div><b>What I've Tried</b></div>
<div>foo has 3 events similar to OnButtonDown, OnMouseMove, and
OnButtonUp. I figure, why not just call these methods (within
vtkPVInteractorStyle) from foo? This is what I've been trying.</div>
<div>I have made foo a friend of vtkPVInteractorStyle. I've
created a global pointer variable, g_pInteractorStyle, which
points to vtkPVInteractorStyle.</div>
<div>I've created a mutator and two integer variables - m_x and
m_y - within foo to hold mouse coordinates. Any time that
GetEventPosition()[0/1] is called, I save those values to local
variables - x and y - and pass them into foo's mutator. This
way, any time a real mouse is used, foo gets updated
coordinates. This also now gives me starting points to pass into
OnMouseMove.</div>
<div>From foo I first call g_pInteractorStyle->OnButtonDown(3,
0, 0). Ideally, this will initiate zoom, which it seems to.</div>
<div>Following that, I make a series of calls following the
pattern: g_pInteractorStyle->Current->OnMouseMove(m_x, m_y
+ <i>offset</i>, g_pInteractorStyle->CurrentRenderer,
g_pInteractorStyle->Interactor), where <i>offset</i> is some
integer value from -49 to 49 and neither m_x or m_y change
during the series of calls.</div>
<div>Finally, I call g_pInteractorStyle->OnButtonup(3).</div>
<div><br>
</div>
<div>I have also commented out one line each from OnButonDown and
OnButtonUp:
this->InvokeEvent(vtkCommand::[Start/End]InteractionEvent).
With these two lines in place, OnButtonUp causes a crash.
Without these lines in place (when they're commented out),
ParaView acts just fine. I know this is NOT a good fix and I'm
open to other suggestions, but it (this aspect) seems to be
working at the moment.</div>
<div><br>
</div>
<div>I've also tried looking into the QT libraries and moving the
cursor via QT. Unfortunately, I've been unable to find the right
cursor because nothing I've done has had any effect on the
cursor I'm staring at (tried setPos() and setShape()).</div>
<div><br>
</div>
<div><b>The Problem</b></div>
<div>OnMouseMove() has caused problem after problem. In our
current setup OnButtonDown(3, 0, 0) works great. OnMouseMove()
kills paraview when it reaches vtkPVRenderView::Render() called
from somewhere within vtkPVGenericRenderWindowInteractor. In a
weak attempt to "fix" the problem, I tried commenting out this
Render() call. Nothing too major seemed to break except that I'm
blind as i try to zoom until I release the mouse button (tests
were done using the mouse at first). In other words: Everything
still working, but no rendering during zoom - only renders upon
releasing the mouse. I now try it with foo, and it acts as
though OnButtonUp(3) was never called - the whole foo routine
finishes then I use the mouse and click somewhere to start a new
interaction, and it zooms to wherever it should have zoomed when
it finished foo's routines.</div>
<div><br>
</div>
<div>So two options: I can either let it die every time it tries
to render, or hold off rendering until I finish "moving the
mouse" and then still be required to click the mouse somewhere
when I'm finished.</div>
<div><br>
</div>
<div>This is broken. And something tells me I'm going about this
in a very wrong fashion. How should I be doing this?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>David Zemon</div>
<div>Computer</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the ParaView Wiki at: <a class="moz-txt-link-freetext" href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Felipe Bordeu Weldt
Ingénieur de Recherche
-------------------------------------
Tél. : 33 (0)2 40 37 16 57
Fax. : 33 (0)2 40 74 74 06
<a class="moz-txt-link-abbreviated" href="mailto:Felipe.Bordeu@ec-nantes.fr">Felipe.Bordeu@ec-nantes.fr</a>
Institut GeM - UMR CNRS 6183
École Centrale Nantes
1 Rue de La Noë, 44321 Nantes, FRANCE
-------------------------------------</pre>
</body>
</html>