<div>Thank you very much Cory.</div>
<div>This is exactly the problem.</div>
<div> </div>
<div>Li<br><br></div>
<div class="gmail_quote">On Mon, Apr 9, 2012 at 8:53 AM, Cory Quammen <span dir="ltr"><<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Please excuse my typo. That would be<br><br>proxy->GetRenderer()->ResetCameraClippingRange();<br><br>Cory<br>
<div class="HOEnZb">
<div class="h5"><br>On Mon, Apr 9, 2012 at 8:52 AM, Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>> wrote:<br>> Hi Li,<br>><br>> After modifying the camera and before rendering, try inserting a call to<br>
><br>> proxy-GetRenderer()->ResetCameraClippingRange();<br>><br>> Cory<br>><br>> On Mon, Apr 9, 2012 at 2:23 AM, Li Guan <<a href="mailto:li.9uan@gmail.com">li.9uan@gmail.com</a>> wrote:<br>>> Hi,<br>
>><br>>> I am writing a plugin to change window size, change camera to designated<br>>> pose and hope to grab Z-buffer for a 3D model that I am rendering. What I<br>>> found is that after I set a new window size, set a new camera position,<br>
>> viewup direction, focal point, and render the window, the 3D model<br>>> disappeared. But after I drag with my mouse in the empty window, the 3D<br>>> model shows up. Not sure what I did incorrectly...<br>
>><br>>> Here are my code segment:<br>>><br>>> if(proxy){<br>>> proxy->GetRenderWindow()->Render();<br>>><br>>> vtkCamera *camera = proxy->GetActiveCamera();<br>
>> //proxy->GetRenderer()->ResetCamera();<br>>> camera->SetParallelProjection(false);<br>>> camera->SetFocalPoint(-4.63865, 1.56608, 51.092);<br>>> camera->SetViewUp(0.9435, 0.1077, 0.3134);<br>
>> camera->SetPosition(-9.4128, 9.97, 62.5772);<br>>> int h = 480, w = 640;<br>>> proxy->GetRenderWindow()->SetSize(w,h);<br>>> proxy->GetRenderWindow()->Render();<br>
>> }<br>>><br>>> Hope anyone can explain a bit. Thanks,<br>>><br>>> Li<br>>><br>>> _______________________________________________<br>>> Paraview-developers mailing list<br>
>> <a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>>> <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
>><br>><br>><br>><br>> --<br>> Cory Quammen<br>> Research Associate<br>> Department of Computer Science<br>> The University of North Carolina at Chapel Hill<br><br><br><br>--<br>Cory Quammen<br>
Research Associate<br>Department of Computer Science<br>The University of North Carolina at Chapel Hill<br></div></div></blockquote></div><br>