[vtkusers] Display Coordinates after translate

Wenlong Wang scc.wwl at gmail.com
Fri Oct 28 11:21:04 EDT 2011


And as I tested, the actor position and camera position were not changed
after the translation. Even the actor did move to another position on the
screen.

Can anyone explain why is this happening?

Many thanks in advance.

Long

2011/10/28 Wenlong Wang <scc.wwl at gmail.com>

> Dear all,
>
> I'm trying to translate my actor (a polydata mesh) with vtkTransform and
> vtkTransformFilter. What I want to do is translate my actor and get the
> difference of display coordinates of some specific points.
>
> My current method is like follows
> *
> //-----------Translation finished above----------------------
> for (int i = 0; i< 14; i++)
>     {
>         points->GetPoint(landmarks[i], newcoord[i]);
>         ren->SetWorldPoint(newcoord[i]);
>         ren->WorldToDisplay();
>         ren->GetDisplayPoint(newcoord[i]);
>     }
> //-----------------------------------------------------------------------*
>
> However, the display coordinates after the translation are the same as
> before translation.
>
> Is there any other method to achieve it?
>
> Thank you very much for your kindly help.
>
> Best wishes
> Long
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111028/903cd651/attachment.htm>


More information about the vtkusers mailing list