[vtkusers] How to get the extent points of a render window..??

rakesh patil prakeshofficial at gmail.com
Wed Apr 13 00:15:35 EDT 2011


Well,

I don't have any knowledge of any coordinates. Through code, I need to
compute min_lat, max_lat, min_long, and max_long for a given point.
I tried getting the viewPort coordinates, but everytime it is showing
(0,0,1,1). Using this how can I achieve what I want..??

I would also appreciate, if you explain me more on the second option i.e
TransformMatrix..

Thanks in advance

On Wed, Apr 13, 2011 at 3:43 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> Use a view-to-world coordinate transformation.  In view coordinates,
> the X and Y vary from -1.0 to +1.0 and Z varies from 0.0 to 1.0.
>
> One way to do this is with the vtkRenderer::ViewToWorld() function,
> but I prefer t get the CompositeProjectionTransformMatrix from the
> camera, invert it, and then use it directly as a 4x4 transformation
> matrix between view coords and world coords.
>
>  - David
>
>
> On Tue, Apr 12, 2011 at 4:01 PM, rakesh patil <prakeshofficial at gmail.com>
> wrote:
> > Hello Users,
> >
> > How can I get the extents coordinates of a render window? I mean, suppose
> a
> > grid is displayed on a render window, and I want to know min_lat,
> max_lat,
> > min_lon, max_lon for that entire scene. I dont want the min/max lat/lons,
> of
> > the grid, but the extreme coordinate points of the render window?
> >
> > Is it possible in VTK?
> >
> > Thanks in advance
> >
> > Regards
> > Rakesh Patil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110413/9a3103da/attachment.htm>


More information about the vtkusers mailing list