[vtkusers] How to change camera angle in slow motion?
Alex Malyushytskyy
alexmalvtk at gmail.com
Thu Sep 12 18:31:53 EDT 2013
Does below link help?
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Animation/AnimateActors
Alex
On Thu, Sep 12, 2013 at 12:50 PM, Jian Li <jian.li at cometsolutions.com>wrote:
> Hi;
>
> I'm using vtk-6.1.0 on Windows 7. I created a view widget which has
> options to change camera angles, such as, Bottom, Front, Left, Right ....
> And the following is part of the code that handles the camera position.
>
> dataPtr_->renderer_->GetActiveCamera()->SetPosition(newPos[0] +
> focalPoint[0], newPos[1] + focalPoint[1], newPos[2] + focalPoint[2]);
> dataPtr_->renderer_->GetActiveCamera()->SetViewUp(newPos[3],
> newPos[4], newPos[5]);
> dataPtr_->renderer_->GetActiveCamera()->SetViewAngle(30);
> dataPtr_->renderer_->GetActiveCamera()->OrthogonalizeViewUp();
> dataPtr_->renderer_->ResetCameraClippingRange();
> dataPtr_->renderer_->ResetCamera();
> dataPtr_->displayWidget_->GetRenderWindow()->Render();
>
> They work fine, but the view of the object is updated instantly like
> changing a slide. I wonder if there is a setting that can show the movement
> in slow motion, i.e. user can see the object in the scene rotate to the
> required camera position. I've seen some gui applications have this
> feature, I don't know if VTK can do it. Any help is appreciated.
>
>
> Thanks
> Jian
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130912/1efc537e/attachment.htm>
More information about the vtkusers
mailing list