Getting the right view
Lisa S. Avila
lisa.avila at kitware.com
Sat Mar 11 00:33:12 EST 2000
Hello Brian,
By "touching one actor" do you mean touching the actual actor, or some part
of the bounding box of the actor?
I don't believe there is a simple was to do it.
One way to do it, if you are writing C++ code for it, is to get each point
of the bounding box of each actor (or every point in every actor) and
transform it according to the camera matrix into a coordinate in "camera
space". Using these results you can adjust some camera settings (which ones
would depend on whether you are using a perspective or parallel viewing
transform) to achieve the desired results. If you want it to touch in all
four directions, you'll also need to adjust the aspect ratio of the window.
Lisa
At 12:52 PM 3/10/00, Brian Alexander Todd wrote:
>Dear vtkusers,
>
>I would like to adjust the view on my vtkRenderWindow so
>that the all of the actors projected on the screen are
>inside the window but each edge of the window touches
>at least one actor. This will make the window frame "snug"
>around the scene.
>
>Is there some easy way to achieve this effect? If yes
>what is it? If no could someone please suggest a general
>procedure to accomplish this?
>
>Thanks,
>Brian Todd
>
>
>Brian Todd
>email: bat5 at po.cwru.edu
>home: (216) 321-8882
>office: (216) 368-4209
>fax: (216) 368-4969
>
>--------------------------------------------------------------------
>This is the private VTK discussion list. Please keep messages on-topic.
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
><majordomo at public.kitware.com>. For help, send message body containing
>"info vtkusers" to the same address.
>--------------------------------------------------------------------
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list