#NEWLINE# def pick_world( self , x , y ) : #NEWLINE# #INDENT# ' Picks a world point and probes for data there. Returns a\n        `PickedData` instance.' #NEWLINE# self . worldpicker . pick ( ( float ( x ) , float ( y ) , 0.0 ) , self . renwin . renderer ) #NEWLINE# try : #NEWLINE# #INDENT# self . cellpicker . pick ( ( float ( x ) , float ( y ) , 0.0 ) , self . renwin . renderer ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# self . cellpicker . pick ( float ( x ) , float ( y ) , 0.0 , self . renwin . renderer ) #NEWLINE# #UNINDENT# wp = self . worldpicker #NEWLINE# cp = self . cellpicker #NEWLINE# coord = wp . pick_position #NEWLINE# self . probe_data . points = [ list ( coord ) ] #NEWLINE# picked_data = PickedData ( ) #NEWLINE# picked_data . coordinate = coord #NEWLINE# if cp . mapper : #NEWLINE# #INDENT# data = get_last_input ( cp . mapper . input ) #NEWLINE# probe = tvtk . ProbeFilter ( ) #NEWLINE# probe . source = data #NEWLINE# probe . input = self . probe_data #NEWLINE# probe . update ( ) #NEWLINE# data = probe . output . point_data #NEWLINE# bounds = cp . mapper . input . bounds #NEWLINE# picked_data . valid = 1 #NEWLINE# picked_data . world_pick = 1 #NEWLINE# picked_data . point_id = 0 #NEWLINE# picked_data . data = data #NEWLINE# self . _update_actor ( coord , bounds ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . p_actor . visibility = 0 #NEWLINE# #UNINDENT# self . renwin . render ( ) #NEWLINE# return picked_data