[vtkusers] Fixing the rendering view
kteich at nmr.mgh.harvard.edu
Fri Sep 27 14:43:52 EDT 2002
Still working on getting the coords of the mouse in a texture mapped
plane. Picking cells in a 256x256 resolution plane is a little slow, so
I'm thinking I should just get the x,y coords from the mouse in the Tcl
window and use those to get the coords, as if I was using an ImageViewer.
I haven't found a good way to flexibly lock the render view so that it
shows the plane and nothing more, such that 0,0 in the view is 0,0 in the
plane, etc. I can manually arrange the plane in the view, get the camera
location, and set the camera to that location in the code, but it's not
very flexible; I can resize the window back and forth and make the view
show a little background space on one side.
Is there an easy function to do what I want? vtkRenderer::ResetCamera
looked good, but it doesn't show the area and nothing but the area
specified. I could probably find a way to compute the new camera location
upon window resize, is this the way to go?
More information about the vtkusers