[vtkusers] Picking in Java
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Mon Mar 11 22:09:08 EST 2002
>>>>> "AT" == ahmed Tokalak <tokalak at web.de> writes:
AT> picker.Pick((double)e.getX(), (double)
AT> this.getSize().getHeight() - e.getY(), 0.0, this.ren);
Try this:
picker.Pick((double)e.getX(),
(double)this.getSize().getHeight() - e.getY() -1,
0.0, this.ren);
i.e. just add a -1 at the end of the second argument. This is
necessary because e.getY() most probably is counted from 0 whereas the
height itself is in terms of number of pixels which is counted from 1.
prabhu
More information about the vtkusers
mailing list