[vtkusers] Flipping the image with vtkCamera::Yaw() makes image disappear

Thomas Lambertz thomas at hexerei-software.de
Fri Mar 2 10:15:35 EST 2007


Jesús Spí­nola schrieb:
>
>     What about mirroring your camera-position on the other side of your
>     image ? This would give you a change in left/right (if this is your
>     intention).
>
>
> Is just what I want, a mirror effect
I realized this with:

    Renderer->GetActiveCamera()->SetPosition  (0.0,0.0,1000.0);
    Renderer->GetActiveCamera()->SetFocalPoint(0.0,0.0,-1000.0);

I used a parallel projection - you might want use smaller z.
>
>     When you roll(180) then you got a left/right AND upside/down flip. 
>
>
> You're wrong, with Roll, you rotate the image by the Z axis. With this 
> you get left/right and upside/down flipped too , I only want to flip 
> horizontally (left becomes right and viceversa) but up and down 
> remains the same.

Your description is *exactly* what i wrote. Thats why i wrote "AND" and 
not only "and" ;-)

> I tried with Azimuth that does something similar to Yaw but about the 
> position of the camera, not the focal point, the problem is if I move 
> the image actor this movement is also mirrored, so I need to take into 
> account another parameters ( position, focal point, translation... )
>
> I want the same effect as if I rotate the image actor with this sample 
> code
>
> imageActor->SetOrigin( imageActor->GetCenter() );
> imageActor->RotateY( 180 ) ;
>
> (assuming we are on axial view)
>
> but I want to do the same effect with the camera.
>
>     Hth,
>     Tom
>
>




More information about the vtkusers mailing list