[vtkusers] 回复: 回复: How can I reset the carmera

455535440 455535440 at qq.com
Mon Dec 12 09:38:27 EST 2011


OK. First I save a variable double m_cameraPosition[3] in class to save the original position of the camera, then I called the fuction m_ren->GetActiveCamera()->SetPosition(m_cameraPosition) befor render the actor, the original position is saved in class. if I want to reset the camera to the original position ,call the function like :m_ren->GetActiveCamera()->SetPosition(m_cameraPosition);
    m_ren->GetActiveCamera()->SetViewUp(0.0,1.0,0.0); ren->ResetCamera(); 
  
 
------------------ 原始邮件 ------------------
发件人: "David Doria"; 
发送时间: 2011年12月12日(星期一) 晚上10:25
收件人: "455535440"<455535440 at qq.com>; 
抄送: "vtkusers"; 
主题: Re: 回复: [vtkusers] How can I reset the carmera

 
2011/12/12 455535440 <455535440 at qq.com>:
> I reset it successfully, thanks David~~~~

Please let us know what you learned. Which functions did you use?
Which function/matrix returned the full state of the camera? It would
be great if 1) you could make an example of doing this on the wiki and
2) you could suggest improved text for the vtkCamera documentation.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111212/baf2ec03/attachment.htm>


More information about the vtkusers mailing list