[vtkusers] World coordinates of the vtkRenderWindows screen boundaries

Sarah Macumber S.Macumber at QuestReliability.com
Wed Jul 23 15:26:40 EDT 2008


Thanks Dave, that code will do just fine! 
 
For others that were wondering how to compute world points from screen points :
 
double verts[4]
renderer->SetDisplayPoint(x,y,z);

renderer->DisplayToWorld();

renderer->GetWorldPoint(&verts[4]);

Thanks, Sarah

________________________________

From: David E DeMarle [mailto:dave.demarle at kitware.com]
Sent: Wed 7/23/2008 11:44 AM
To: Sarah Macumber
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] World coordinates of the vtkRenderWindows screen boundaries



Take a look at what vtkAreaPicker::DefineFrustum(0.0,0.0,1.0,1.0,
&Renderer). That method is protected, so you can't call it directly,
but you could borrow the code inside it.
cheers,
Dave DeMarle

On Wed, Jul 23, 2008 at 12:38 PM, Sarah Macumber
<S.Macumber at questreliability.com> wrote:
> Hello all,
>
> I am looking for a way to determine the camera's viewable extents in world coordinates, which I need to know to buffer data.
>
> I cannot view all my data at once, so it is broken up into sections along the axis.  I place some data at (0,0) and then pan / zoom around and would like to know what new range of data I am now looking at in the event that I may need to load some more data into my buffer.  This happens when someone would pan left or right.  The camera will tell you where its center is but I am looking for a way to determine what data range it is viewing in world coordinates, as in how much of the X / Y / Z axis am I seeing?  Is this something that I could acomplish with vtkSelectVisiblePoints <http://www.vtk.org/doc/nightly/html/classvtkSelectVisiblePoints.html>  ?
>
> Thanks in advance,
> Sarah
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>





More information about the vtkusers mailing list