[vtkusers] Picking invisible object !

Charl P. Botha c.p.botha at ewi.tudelft.nl
Mon Jul 21 07:08:53 EDT 2003


On Mon, 2003-07-21 at 13:05, Sebastien Auclair wrote:
> I need to allow the user to drag a picked object but not in X, Y direction
> on the display plane.
> For instance, he must be able to drag a cube on the World X axis only.
> To do that, my approach so far is to create an invisible vtkPlane that i try
> to use to compute an intersection point with a ray i create based on
> DisplayToWorld and the mouse coordinates.

Why don't you just create a new vtkInteractorStyle class?  For instance,
you could inherit from the vtkInteractorStyleTrackballActor and simply
prevent the PAN mode from being entered, or the Pan() method from being
called.

This seems far simpler than what you're doing, unless I'm
misunderstanding something.

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list