[vtkusers] 回复: How can I reset the carmera
455535440
455535440 at qq.com
Mon Dec 12 09:24:01 EST 2011
I reset it successfully, thanks David~~~~
------------------ 原始邮件 ------------------
发件人: "David Doria";
发送时间: 2011年12月12日(星期一) 晚上8:31
收件人: "455535440"<455535440 at qq.com>;
抄送: "vtkusers";
主题: Re: [vtkusers] How can I reset the carmera
2011/12/12 455535440 <455535440 at qq.com>:
> hello everyone:
> I got an actor rendered on the vtkRenderer, Then I use the Interactor move
> and rotate the actor, but after that I want to make the actor undo all the
> action so that the actor should look like it first display.
> I call the method vtkRenderer::ResetCamera ,The camera reposition itself
> to view the center point of the actors,but actually it just undo the
> "move",the actor didn't rotate, anyone can help me reset the carmera to the
> original place?
> thx~~~
You could use vtkCamera * vtkRenderer::GetActiveCamera () before the
interaction to get the camera and then SetActiveCamera(vtkCamera*) to
set it back when you want to reset. You could also get the matrix of
the camera (GetModelTransformMatrix) and then set the matrix of the
camera when you want to reset (SetModelTransformMatrix (vtkMatrix4x4
*matrix)).
(Actually I'm not sure the difference between the
vtkCamera::Get*Matrix functions - the documentation should be improved
here).
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111212/b53ac49a/attachment.htm>
More information about the vtkusers
mailing list