No subject


Wed May 9 12:08:04 EDT 2012


this will initiate zoom, which it seems to.
Following that, I make a series of calls following the pattern:
g_pInteractorStyle->Current->OnMouseMove(m_x, m_y + *offset*,
g_pInteractorStyle->CurrentRenderer, g_pInteractorStyle->Interactor), where
*offset* is some integer value from -49 to 49 and neither m_x or m_y change
during the series of calls.
Finally, I call g_pInteractorStyle->OnButtonup(3).

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.

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()).

*The Problem*
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.

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.

This is broken. And something tells me I'm going about this in a very wrong
fashion. How should I be doing this?

Thanks,
David Zemon
Computer

--00248c767e3614d2fa04c1260a37
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello,<div><br></div><div><b>Overview</b></div><div>I am attempting to cont=
rol ParaView v3.14.1 with something other than a mouse and keyboard. I don&=
#39;t know how to do this - I&#39;ve taken some wild guesses and bits &#39;=
n&#39; pieces have started to work. I could really use some help from someo=
ne that knows the inner-workings though.</div>
<div><br></div><div><b>What I&#39;d Like to Happen</b></div><div>I have an =
class, foo, with some events and callbacks of its own. Foo is not related t=
o ParaView in any way other than foo needs to make ParaView do stuff as it =
sees fit. In the callbacks, I&#39;d like to do things like zoom, pan and ro=
tate. Eventually I&#39;d like foo to be able add filters and such too, but =
that&#39;s a long way down the road.</div>
<div><br></div><div><b>What I&#39;ve Tried</b></div><div>foo has 3 events s=
imilar to OnButtonDown, OnMouseMove, and OnButtonUp. I figure, why not just=
 call these methods (within vtkPVInteractorStyle) from foo? This is what I&=
#39;ve been trying.</div>
<div>I have made foo a friend of vtkPVInteractorStyle. I&#39;ve created a g=
lobal pointer variable, g_pInteractorStyle, which points to vtkPVInteractor=
Style.</div><div>I&#39;ve created a mutator and two integer variables - m_x=
 and m_y - within foo to hold mouse coordinates. Any time that GetEventPosi=
tion()[0/1] is called, I save those values to local variables - x and y - a=
nd pass them into foo&#39;s mutator. This way, any time a real mouse is use=
d, foo gets updated coordinates. This also now gives me starting points to =
pass into OnMouseMove.</div>
<div>From foo I first call g_pInteractorStyle-&gt;OnButtonDown(3, 0, 0). Id=
eally, this will initiate zoom, which it seems to.</div><div>Following that=
, I make a series of calls following the pattern: g_pInteractorStyle-&gt;Cu=
rrent-&gt;OnMouseMove(m_x, m_y + <i>offset</i>, g_pInteractorStyle-&gt;Curr=
entRenderer, g_pInteractorStyle-&gt;Interactor), where <i>offset</i> is som=
e integer value from -49 to 49 and neither m_x or m_y change during the ser=
ies of calls.</div>
<div>Finally, I call g_pInteractorStyle-&gt;OnButtonup(3).</div><div><br></=
div><div>I have also commented out one line each from OnButonDown and OnBut=
tonUp: this-&gt;InvokeEvent(vtkCommand::[Start/End]InteractionEvent). With =
these two lines in place, OnButtonUp causes a crash. Without these lines in=
 place (when they&#39;re commented out), ParaView acts just fine. I know th=
is is NOT a good fix and I&#39;m open to other suggestions, but it (this as=
pect) seems to be working at the moment.</div>
<div><br></div><div>I&#39;ve also tried looking into the QT libraries and m=
oving the cursor via QT. Unfortunately, I&#39;ve been unable to find the ri=
ght cursor because nothing I&#39;ve done has had any effect on the cursor I=
&#39;m staring at (tried setPos() and setShape()).</div>
<div><br></div><div><b>The Problem</b></div><div>OnMouseMove() has caused p=
roblem after problem. In our current setup OnButtonDown(3, 0, 0) works grea=
t. OnMouseMove() kills paraview when it reaches vtkPVRenderView::Render() c=
alled from somewhere within vtkPVGenericRenderWindowInteractor. In a weak a=
ttempt to &quot;fix&quot; the problem, I tried commenting out this Render()=
 call. Nothing too major seemed to break except that I&#39;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 durin=
g 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 fi=
nishes 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&#39;s =
routines.</div>
<div><br></div><div>So two options: I can either let it die every time it t=
ries to render, or hold off rendering until I finish &quot;moving the mouse=
&quot; and then still be required to click the mouse somewhere when I&#39;m=
 finished.</div>
<div><br></div><div>This is broken. And something tells me I&#39;m going ab=
out 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>

--00248c767e3614d2fa04c1260a37--


More information about the ParaView mailing list