<div>On Tue, Jul 26, 2011 at 5:54 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi David,<br>
<br>
You should never, ever call renderer->Render(). That method is only<br>
meant to be called by the vtkRenderWindow. The documentation says<br>
so quite clearly. By calling it you are probably causing some timestamps<br>
to be set (indicating that all actors in the renderer have rendered), but you<br>
aren't actually doing any rendering. Then, when you call<br>
renderWindow->Render() it sees that those timestamps have been updated<br>
and thinks that there is nothing to be done.<br>
<br>
Also it is a good idea to always set the ViewUp when setting the<br>
Position and FocalPoint. All three are needed in order to uniquely<br>
define the view transform.<br>
<font color="#888888"><br>
- David</font></blockquote><div><br></div><div>Thanks for pointing that out. After removing those calls, it works properly:</div><div><br></div><div> vtkCamera* camera = renderer->GetActiveCamera();</div><div> camera->SetPosition(450, 100, 100);</div>
<div> camera->SetFocalPoint(200, 0, 0);</div><div> camera->SetViewUp(0, 0, 1);</div><div> </div><div> renderWindow->Render();</div><div> renderWindowInteractor->Start();</div><div><br></div><div>However, if I have called renderWindow->Render(); before positioning the camera, even if I call Modified() on the renderer and renderWindow before the next Render() call, the output is still incorrect before an interaction occurs:</div>
<div><br></div><div><div> renderWindow->Render();</div><div><br></div><div> vtkCamera* camera = renderer->GetActiveCamera();</div><div> camera->SetPosition(450, 100, 100);</div><div> camera->SetFocalPoint(200, 0, 0);</div>
<div> camera->SetViewUp(0, 0, 1);</div><div><br></div><div> renderer->Modified();</div><div> renderWindow->Modified();</div><div> renderWindow->Render();</div><div> renderWindowInteractor->Start();</div>
</div><div><br></div><div>Does this make sense?</div><div><br></div><div><div>Thanks,</div></div><br><div>David </div></div>