[vtkusers] Getting a world coordinate from a display coordinate?

Erik Sobel erik.sobel at alphatech.com
Fri Jun 9 16:42:53 EDT 2000


I am trying to convert the mouse coordinate in a renderWindow into its 
world coordinate.

I am using (in Tcl)
	myRenderer SetDisplayPoint $x $y 0  <--All the data is in the same z plane
	myRenderer DisplayToWorld
	set worldPoint [myRenderer GetWorldPoint]

The x-coordinate of the worldPoint works pretty well - it reports the 
x-coordinate of a voxel despite changes in camera pan and zoom.  However, 
the y-coordinate seems to get messed up by camera pan.  It is not affected 
by camera zoom.  Both are affected by camera Roll. (I am not doing any 
camera Pitch or Yaw).

Is there a better way to get the world coord from a display coord?  Is 
there a vtkWhatTheHeckScalarComponentIsTheCursorOver object?

Thanks,
Erik






More information about the vtkusers mailing list