[vtkusers] Coordinate problems

Eric E. Monson emonson at cs.duke.edu
Mon Mar 29 09:18:05 EDT 2010


Hello,

The renderer (vtkRenderer) you're using for your render window can do the calculation for you. It should be something like:

double worldPt[4], viewPt[3];

// ... assign worldPt

renderer->SetWorldPoint(worldPt);
renderer->WorldToView();
renderer->GetViewPoint(viewPt);

// ... read out viewPt

You can see the documentation at:

http://www.vtk.org/doc/nightly/html/classvtkRenderer.html

where some of the methods are defined in vtkViewport, so click the "List of all members" link to see everything available.

Good luck,
-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Mar 24, 2010, at 4:59 PM, igorznt wrote:

> 
> I have a point in world coordinate system and i need  its value in the 'View'
> coordinate system (VIEW -   x-y-z (-1,1) values in camera coordinates. (z is
> depth)), but  there's no way with vtkCoordinate. Does anyone knows how could
> i get it?
> -- 
> View this message in context: http://old.nabble.com/Coordinate-problems-tp28021293p28021293.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK 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