[vtkusers] ActiViz | vtkRenderWindowInteractor Start event

Matias Montroull matimontg at gmail.com
Tue Apr 1 13:28:45 EDT 2014


Ok gotcha, is there a way to get into the VTK loop and modify stuff or once
you start the interactor you're stuck with it until you close the render
window?


On Tue, Apr 1, 2014 at 9:53 AM, David Cole <dlrdave at aol.com> wrote:

> Do you have a "main"?
>
> Are you calling "Application::Run(form);"?
>
> WinForms will run a message loop for you if you call the Application Run
> method. In that sense, it does exactly the same thing conceptually as
> vtkRenderWindowInteractor::Start.
>
> The message loop usually looks something like this, if you look at the
> source code for one:
>
>    while (GetMessage(&msg, ...))
>    {
>      TranslateMessage(&msg);
>      DispatchMessage(&msg);
>    }
>
> http://en.wikipedia.org/wiki/Message_loop_in_Microsoft_Windows
>
>
> HTH,
> David
>
>
>
> -----Original Message-----
> From: Matias Montroull <matimontg at gmail.com>
> To: David Cole <dlrdave at aol.com>
> Cc: vtkusers <vtkusers at vtk.org>
> Sent: Mon, Mar 31, 2014 8:56 pm
> Subject: Re: [vtkusers] ActiViz | vtkRenderWindowInteractor Start event
>
>
> Hi David, thanks for the response.
>
>
> I'm using this into a Windows Form Application. What would be my message
> loop? I'm not quite sure what that means, can you explain a bit more?
>
>
> Thanks!
>
>
>
>
>
> On Sat, Mar 29, 2014 at 1:59 PM, David Cole <dlrdave at aol.com> wrote:
>
> iren.Start(); runs a message loop, and doesn't exit until you as a user
> exit that window (either press the 'q' key, or close the window)
>
> If you don't want that because you're building this into an application
> where you already have your own message loop, then simply don't call
> iren.Start();...
>
> Instead, call "renwin.Render();" to show the window and render its
> contents. If you're running in the context of a WinForms application, or
> something like it, then your message loop should suffice to cause events to
> be processed for the render window.
>
>
> HTH,
> David C.
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140401/ca8e01aa/attachment.html>


More information about the vtkusers mailing list