<div class="gmail_quote">On Wed, Mar 24, 2010 at 2:10 PM, Francois Bertel <span dir="ltr"><<a href="mailto:francois.bertel@kitware.com">francois.bertel@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
Here is the code to measure the rendering time:<br>
<br>
<br>
vtkRenderWindow *r=vtkRenderWindow::New();<br>
vtkTimerLog *t=vtkTimerLog::New();<br>
<br>
[...]<br>
<br>
t->StartTimer();<br>
r->Render();<br>
r->WaitForCompletion();<br>
t->StopTimer();<br>
<br>
double timeInSeconds=t->GetElapsedTime();<br>
double fps=1.0/timeInSeconds;<br>
<div><div></div><div class="h5"></div></div></blockquote></div><br><div>So where would be the best place to put this code? Do you have to subclass the interactor style and put the timer code around which ever function calls Render()? It seems like we should make a vtkRenderWindow::GetFrameRate() - what do you think Francois?</div>
<div><br clear="all">Thanks,<br><br>David</div>