[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    Re: [vtk-developers] Timer in vtkOpenVRRenderWindowInteractor
From:       Ken Martin <ken.martin () kitware ! com>
Date:       2017-10-30 18:16:48
Message-ID: CANXz0Sba6a62jKY388j-5aFfoi4YyxZ1cfAC2_gaN7V1mSPEuQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


One way to do animation is to use an observer on the render's StartEvent
and update your items there.

Thanks!
Ken

On Tue, Oct 17, 2017 at 1:24 AM, Florence8627 <florence.wang@csiro.au>
wrote:

> I am having issues in creating a repeating timer with
> vtkOpenVRRenderWindowInteractor..
> I definied a vtkTimerCallback class just like how timer is used in normal
> vtkRenderWindowInteractor Then, // assuming iren is the interactor pointer
>   vtkNew<vtkOpenVRRenderWindowInteractor> iren;
>   iren->Initialize();
> // Sign up to receive TimerEvent
>   vtkSmartPointer<vtkTimerCallback2> cb =
> vtkSmartPointer<vtkTimerCallback2>::New();
>   iren->AddObserver(vtkCommand::TimerEvent, cb);
>   iren->CreateRepeatingTimer(1000);
>   iren->Start();
>
> It seems after start() is called the timer is blocked. Does anyone have any
> clue how to run a timer in vtkOpenVR module ? Or anyway of doing animation
> in vtkOpenVR module?
>
> Thanks !
>
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Dev-f1251487.html
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>


-- 
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.

[Attachment #5 (text/html)]

<div dir="ltr">One way to do animation is to use an observer on the render&#39;s \
StartEvent and update your items \
there.<div><br></div><div>Thanks!</div><div>Ken</div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 17, 2017 at 1:24 AM, \
Florence8627 <span dir="ltr">&lt;<a href="mailto:florence.wang@csiro.au" \
target="_blank">florence.wang@csiro.au</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">I am having issues in creating a repeating timer with<br> \
vtkOpenVRRenderWindowInteracto<wbr>r..<br> I definied a vtkTimerCallback class just \
like how timer is used in normal<br> vtkRenderWindowInteractor Then, // assuming iren \
is the interactor pointer<br>  \
vtkNew&lt;<wbr>vtkOpenVRRenderWindowInteracto<wbr>r&gt; iren;<br>  \
iren-&gt;Initialize();<br> // Sign up to receive TimerEvent<br>
   vtkSmartPointer&lt;<wbr>vtkTimerCallback2&gt; cb =<br>
vtkSmartPointer&lt;<wbr>vtkTimerCallback2&gt;::New();<br>
   iren-&gt;AddObserver(vtkCommand::<wbr>TimerEvent, cb);<br>
   iren-&gt;CreateRepeatingTimer(<wbr>1000);<br>
   iren-&gt;Start();<br>
<br>
It seems after start() is called the timer is blocked. Does anyone have any<br>
clue how to run a timer in vtkOpenVR module ? Or anyway of doing animation<br>
in vtkOpenVR module?<br>
<br>
Thanks !<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://vtk.1045678.n5.nabble.com/VTK-Dev-f1251487.html" \
rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/VTK-Dev-f1251487.html</a><br>
 ______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" \
target="_blank">www.kitware.com</a><br> <br>
Visit other Kitware open-source projects at <a \
href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" \
target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br> <br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" \
rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
 <br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" \
target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
 <br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Ken \
Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware \
Inc.</span><br></div><div>28 Corporate Drive<br>Clifton Park NY \
12065<br><div><br></div><div><span \
style="font-size:10pt;font-family:Tahoma,sans-serif">This communication, including \
all attachments, contains confidential and legally privileged information, and it is \
intended only for the use of the addressee.   Access to this email by anyone else is \
unauthorized. If you are not the intended recipient, any disclosure, copying, \
distribution or any action taken in reliance on it is prohibited and may be unlawful. \
If you received this communication in error please notify us immediately and destroy \
the original message.   Thank you.</span></div></div></div></div></div>
</div>



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic