[vtkusers] global scaling using vtkCamera?

Luca Pallozzi Lavorante lplavorante at gmail.com
Tue Mar 13 15:14:33 EDT 2007


Hi Vidyadhar, thank you for your reply.
I am using the vtkCamera::SetUserTransform() method as you suggested.
I passed a vtkTransform matrix but I don´t know how to manipulate the matrix
in order to achieve a scaling in the Z direction for all
visualized objects. I know that using vtkTransform::Scale(1, 1, ScaleFactor)
simply doesn´t work.
Could you give me a hint on how to do that?

Thank you very much

           Luca


On 3/13/07, vidyadhar <vidyadhar at lucidindia.net> wrote:
>
>  Hi,
> The world (studio?) and camera coordinate systems are different. In your
> scene it is not clear what is correspondence between them (it is determined
> by position, target and viewup settings). In camera CO z is depth and xy
> corresponds to visible rect (x - horizontal, y - vertical).
> vtkCamera accepts a user defined transform (SetUserTransform). Create an
> instance of vtkTransform and use this method on the camera. For example, by
> setting scale (1,-1,1) one can perform vertical flip of entire scene.
> HTH
> Vidyadhar
> ----- Original Message -----
>
> *From:* Luca Pallozzi Lavorante <lplavorante at gmail.com>
> *To:* vtkusers at vtk.org
> *Sent:* Friday, March 09, 2007 5:14 PM
> *Subject:* [vtkusers] global scaling using vtkCamera?
>
> Hi everybody,
> I am trying to scale all my visible objects (vtkPolyData) along the Z
> direction, simulating a "studio" scaling. Currently I am using the
> SetScale() method in each actor. But I noticed that  such scaling comes
> with  a translation along the Z axis. Is there some way to avoid that? Can I
> use vtkCamera to achieve this global scaling instead of modifying each
> actor? I have tried to use the vtkCamera::ApplyTransform() method, but It
> doesn´t work.
>
> Thank you very much
>
>             Luca
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070313/2989f260/attachment.htm>


More information about the vtkusers mailing list