[Paraview-developers] paraview rendering problem after vtkCamera updated

Cory Quammen cquammen at cs.unc.edu
Mon Apr 9 08:53:11 EDT 2012


Please excuse my typo. That would be

proxy->GetRenderer()->ResetCameraClippingRange();

Cory

On Mon, Apr 9, 2012 at 8:52 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> Hi Li,
>
> After modifying the camera and before rendering, try inserting a call to
>
> proxy-GetRenderer()->ResetCameraClippingRange();
>
> Cory
>
> On Mon, Apr 9, 2012 at 2:23 AM, Li Guan <li.9uan at gmail.com> wrote:
>> Hi,
>>
>> I am writing a plugin to change window size, change camera to designated
>> pose and hope to grab Z-buffer for a 3D model that I am rendering. What I
>> found is that after I set a new window size, set a new camera position,
>> viewup direction, focal point, and render the window, the 3D model
>> disappeared. But after I drag with my mouse in the empty window, the 3D
>> model shows up. Not sure what I did incorrectly...
>>
>> Here are my code segment:
>>
>> if(proxy){
>>       proxy->GetRenderWindow()->Render();
>>
>>       vtkCamera *camera = proxy->GetActiveCamera();
>>       //proxy->GetRenderer()->ResetCamera();
>>       camera->SetParallelProjection(false);
>>       camera->SetFocalPoint(-4.63865, 1.56608, 51.092);
>>       camera->SetViewUp(0.9435, 0.1077, 0.3134);
>>       camera->SetPosition(-9.4128, 9.97, 62.5772);
>>       int h = 480, w = 640;
>>       proxy->GetRenderWindow()->SetSize(w,h);
>>       proxy->GetRenderWindow()->Render();
>> }
>>
>> Hope anyone can explain a bit. Thanks,
>>
>> Li
>>
>> _______________________________________________
>> Paraview-developers mailing list
>> Paraview-developers at paraview.org
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>
>
>
>
> --
> Cory Quammen
> Research Associate
> Department of Computer Science
> The University of North Carolina at Chapel Hill



-- 
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill


More information about the Paraview-developers mailing list