[vtkusers] Picking + Rubber Band Snap to Axes

f f gray_java at hotmail.com
Mon Mar 11 18:42:42 EST 2002


Hi,

I'm attempting to make a rubber band-style thing for chopping up a 3d box. 
There'll be a volume render and the user can shift click to anchor, then 
move the mouse and it'll be locked in 2 axes of the volume object, then 
click to anchor again, etc. So they'll click once for the initial spot and 3 
more times for the x, y and z.

I have the rubber band working similarly to TkInteractor.tcl. The problem is 
that I can get the initial point picked from the object fine, but when they 
move the mouse i want two of the axes to be locked (relative to the object). 
So if the object is at an angle when they move the mouse the line will be 
parallel to edges. I can do this by taking the 3d picked coordinates, then 
moving to the closest coordinates on the acceptable line, then switching 
back to 2d. But how do I switch from 3d points like this back to 2d? And is 
there an easier way of doing what i'm trying to do?

thanks

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com




More information about the vtkusers mailing list