[vtkusers] java bindings mouseMoved before vtkPanel being able to pick actors (win32)

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu Nov 8 08:44:38 EST 2012


Thanks for sharing the solution...


On Thu, Nov 8, 2012 at 5:32 AM, Dario Veneziani <dario at netfarm.it> wrote:

> On 07/11/2012 11.20, Dario Veneziani wrote:
>
>> Hi all,
>>
>> I'm embeddeding a vtkPanel into a java swing based application.
>> The parent widget is a JTabbedPane.
>> My code captures mouseMoved to pick the actor hovered by the mouse
>> pointer.
>> I've looked a bit in the pick code and vtk asks actor if they need to
>> render.
>> The problem is I get mouseMoved even when mouse is not moved
>> (I've tried an action with a menu using keyboard).
>> If the render is not done the pick will fail while trying to render
>> (ChoosePixelFormat)
>>
>> I've enabled vtk message confirmation and took a stacktrace with process
>> explorer
>>
>> vtkRendering.dll!**vtkWin32OpenGLRenderWindow::**SetupPixelFormat+0x44d
>> vtkRendering.dll!**vtkWin32OpenGLRenderWindow::**CreateAWindow+0x38a
>> vtkRendering.dll!**vtkWin32OpenGLRenderWindow::**WindowInitialize+0x71
>> vtkRendering.dll!**vtkRenderWindow::DoAARender+**0x389
>> vtkRendering.dll!**vtkRenderWindow::Render+0x326
>> vtkRenderingJava.dll!Java_vtk_**vtkLineIntegralConvolution2D_**
>> GetMagnificationMinValue_133+**0x1f
>>
>>
>> I've got two different errors but both are related to actor picking, I
>> may add some code to avoid picking
>> if the vtkPanel is not ready to pick, but looks like there is no way to
>> known if I can pick, at least from java
>>
>> Regards,
>>
>> Dario
>> ______________________________**_________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/**
>> opensource/opensource.html<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 <http://www.vtk.org/Wiki/VTK_FAQ>
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>>
>
> Problem solved by testing isWindowSet() before picking.
>
>
> Dario
>
> ______________________________**_________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<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 <http://www.vtk.org/Wiki/VTK_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121108/ec4f14b1/attachment.htm>


More information about the vtkusers mailing list